D:\sources\vue_repos>npm install -g @vue/cli npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm WARN @vue/compiler-sfc@3.0.4 requires a peer of vue@3.0.4 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\@vue\cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ @vue/cli@4.5.9 added 1347 packages from 699 contributors in 72.435s
使用 Vue CLI 创建项目
执行命令:vue create book-store-app
1 2 3 4
D:\sources\vue_repos>vue create book-store-app ? Your connection to the default yarn registry seems to be slow. Use https://registry.npm.taobao.org for faster installation? Yes ( 是否选择使用 tabbao 源来加快安装速度,回答: y)
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: (*) Choose Vue version (选择版本) (*) Babel (编码转换) ( ) TypeScript (TypeScript 开发支持) ( ) Progressive Web App (PWA) Support (渐进式网页支持,国内网络目前对这一项支持不好) (*) Router (路由功能) (*) Vuex (状态管理) ( ) CSS Pre-processors (CSS预处理) >( ) Linter / Formatter (代码规范) ( ) Unit Testing (单元测试) ( ) E2E Testing (ESE测试)
选择 Vue 2.x 版本
1 2 3 4 5 6
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex ? Choose a version of Vue.js that you want to start the project with (Use arrow keys) > 2.x 3.x (Preview)
路由是否使用 history 模式,选择 n
1 2 3 4 5
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex ? Choose a version of Vue.js that you want to start the project with 2.x ? Use history mode for router? (Requires proper server setup for index fallback in production) No
Babel, ESLint等配置使用专用配置文件或使用 package.json
1 2 3 4 5 6 7 8
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex ? Choose a version of Vue.js that you want to start the project with 2.x ? Use history mode for router? (Requires proper server setup for index fallback in production) No ? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys) > In dedicated config files In package.json
是否保存选项到预设中
1 2 3 4 5 6 7
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex ? Choose a version of Vue.js that you want to start the project with 2.x ? Use history mode for router? (Requires proper server setup for index fallback in production) No ? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files ? Save this as a preset for future projects? (y/N)
Vue CLI v4.5.9 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex ? Choose a version of Vue.js that you want to start the project with 2.x ? Use history mode for router? (Requires proper server setup for index fallback in production) No ? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files ? Save this as a preset for future projects? No
Vue CLI v4.5.9 ✨ Creating project in D:\sources\vue_repos\book-store-app. ⚙️ Installing CLI plugins. This might take a while...
yarn install v1.22.5 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies...
yarn install v1.22.5 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages...
success Saved lockfile. Done in 5.36s. ⚓ Running completion hooks...
📄 Generating README.md...
🎉 Successfully created project book-store-app. 👉 Get started with the following commands:
yarn add v1.22.5 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. success Saved 5 new dependencies. info Direct dependencies └─ vue-cli-plugin-vuetify@2.0.8 info All dependencies ├─ interpret@1.4.0 ├─ null-loader@3.0.0 ├─ rechoir@0.6.2 ├─ shelljs@0.8.4 └─ vue-cli-plugin-vuetify@2.0.8 Done in 6.29s. ✔ Successfully installed plugin: vue-cli-plugin-vuetify
D:\sources\vue_repos\book-store-app> npm install leancloud-storage --save --registry https://registry.npm.taobao.org npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN rm not removing D:\sources\vue_repos\book-store-app\node_modules\.bin\semver.cmd as it wasn't installed by D:\sources\vue_repos\book-store-app\node_modules\semver npm WARN rm not removing D:\sources\vue_repos\book-store-app\node_modules\.bin\semver as it wasn't installed by D:\sources\vue_repos\book-store-app\node_modules\semver npm WARN rm not removing D:\sources\vue_repos\book-store-app\node_modules\.bin\json5.cmd as it wasn't installed by D:\sources\vue_repos\book-store-app\node_modules\json5 npm WARN rm not removing D:\sources\vue_repos\book-store-app\node_modules\.bin\json5 as it wasn't installed by D:\sources\vue_repos\book-store-app\node_modules\json5
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)