首页 > vue-cli安装

vue-cli安装



C:\Users\lenovo>node -v
v14.16.1

C:\Users\lenovo>npm config set prefix "D:\kf\node\node_global"

C:\Users\lenovo>npm config set cache "D:\kf\node\node_cache"

C:\Users\lenovo>npm install express -g
+ express@4.18.1
added 57 packages from 42 contributors in 6.339s

C:\Users\lenovo>npm install vue
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN lenovo No description
npm WARN lenovo No repository field.
npm WARN lenovo No README data
npm WARN lenovo No license field.

+ vue@3.2.37
added 21 packages from 43 contributors in 5.428s

8 packages are looking for funding
  run `npm fund` for details


Do you want to install 'webpack-cli' (yes/no): y
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...les\webpack\bin\webpack.js
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN webpack-cli@4.10.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.ebpack -v
npm WARN @webpack-cli/configtest@1.2.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.b.com/webpack/webpack-cli)
npm WARN lenovo No description
npm WARN lenovo No repository field. via "npm install -D webpack-cli".
npm WARN lenovo No README data
npm WARN lenovo No license field..
  webpack-cli (https://github.com/webpack/webpack-cli)
+ webpack-cli@4.10.0
added 38 packages from 31 contributors in 5.506sstall -D webpack-cli".

14 packages are looking for funding
  run `npm fund` for details

Error: Cannot find module 'webpack-cli/package.json'
Require stack:
- D:\kf\node\node_global\node_modules\webpack\bin\webpack.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at runCli (D:\kf\node\node_global\node_modules\webpack\bin\webpack.js:65:26)
    at D:\kf\node\node_global\node_modules\webpack\bin\webpack.js:154:5
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\kf\\node\\node_global\\node_modules\\webpack\\bin\\webpack.js'
  ]
}

C:\Users\lenovo>webpack -v
CLI for webpack must be installed.
  webpack-cli (https://github.com/webpack/webpack-cli)

We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): n
You need to install 'webpack-cli' to use webpack via CLI.
You can also install the CLI manually.

C:\Users\lenovo>webpack -v
CLI for webpack must be installed.
  webpack-cli (https://github.com/webpack/webpack-cli)

We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): y
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\lenovo\package.json'
npm WARN @webpack-cli/configtest@1.2.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN webpack-cli@4.10.0 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN lenovo No description
npm WARN lenovo No repository field.
npm WARN lenovo No README data
npm WARN lenovo No license field.

+ webpack-cli@4.10.0
updated 1 package in 1.324s

14 packages are looking for funding
  run `npm fund` for details

Error: Cannot find module 'webpack-cli/package.json'
Require stack:
- D:\kf\node\node_global\node_modules\webpack\bin\webpack.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at runCli (D:\kf\node\node_global\node_modules\webpack\bin\webpack.js:65:26)
    at D:\kf\node\node_global\node_modules\webpack\bin\webpack.js:154:5
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\kf\\node\\node_global\\node_modules\\webpack\\bin\\webpack.js'
  ]
}

C:\Users\lenovo> npm install webpack webpack-cli -g
D:\kf\node\node_global\webpack -> D:\kf\node\node_global\node_modules\webpack\bin\webpack.js
D:\kf\node\node_global\webpack-cli -> D:\kf\node\node_global\node_modules\webpack-cli\bin\cli.js
+ webpack-cli@4.10.0
+ webpack@5.73.0
added 40 packages from 36 contributors and updated 1 package in 6.471s

C:\Users\lenovo>
C:\Users\lenovo>
C:\Users\lenovo>webpack -v
webpack: 5.73.0
webpack-cli: 4.10.0
webpack-dev-server not installed

C:\Users\lenovo>npm install  --global vue-cli
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7&nbs***bsp;higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
D:\kf\node\node_global\vue -> D:\kf\node\node_global\node_modules\vue-cli\bin\vue
D:\kf\node\node_global\vue-init -> D:\kf\node\node_global\node_modules\vue-cli\bin\vue-init
D:\kf\node\node_global\vue-list -> D:\kf\node\node_global\node_modules\vue-cli\bin\vue-list

> metalsmith@2.5.0 postinstall D:\kf\node\node_global\node_modules\vue-cli\node_modules\metalsmith
> node metalsmith-migrated-plugins.js

+ vue-cli@2.9.6
added 230 packages from 203 contributors in 43.634s

C:\Users\lenovo>vue -V
2.9.6

C:\Users\lenovo>vue -V
2.9.6

C:\Users\lenovo>vue init webpack  yb

'git' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
? Project name yb-vue
? Project description Vue.js
? Author yangbo
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests Yes
? Pick a test runner jest
? Setup e2e tests with Nightwatch? Yes
? Should we run `npm install` for you after the project has been created? (recommended) npm

   vue-cli · Generated "yb".


# Installing project dependencies ...
# ========================

npm WARN deprecated babel-eslint@8.2.6: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated eslint-loader@1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated html-webpack-plugin@2.30.1: out of support
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7&nbs***bsp;higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
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 deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated sane@2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

> chromedriver@2.46.0 install C:\Users\lenovo\yb\node_modules\chromedriver
> node install.js

Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
Downloading from file:  https://chromedriver.storage.googleapis.com/2.46/chromedriver_win32.zip
Saving to file: C:\Users\lenovo\AppData\Local\Temp\2.46\chromedriver\chromedriver_win32.zip
Received 781K...
Received 1568K...
Received 2352K...
Received 3136K...
Received 3920K...
Received 4523K total.
Extracting zip contents
Copying to target path C:\Users\lenovo\yb\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at C:\Users\lenovo\yb\node_modules\chromedriver\lib\chromedriver\chromedriver.exe

> core-js@2.6.12 postinstall C:\Users\lenovo\yb\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

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 -)


> es5-ext@0.10.61 postinstall C:\Users\lenovo\yb\node_modules\es5-ext
>  node -e "try{require('./_postinstall')}catch(e){}" || exit 0


> uglifyjs-webpack-plugin@0.4.6 postinstall C:\Users\lenovo\yb\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules\sane\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":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN update-browserslist-db@1.0.4 requires a peer of browserslist@>= 4.21.0 but none is installed. You must install peer dependencies yourself.

added 1852 packages from 1118 contributors in 223.863s

72 packages are looking for funding
  run `npm fund` for details



Running eslint --fix to comply with chosen preset rules...
# ========================


> yb-vue@1.0.0 lint C:\Users\lenovo\yb
> eslint --ext .js,.vue src test/unit test/e2e/specs "--fix"


# Project initialization finished!
# ========================

To get started:

  cd yb
  npm run dev

Documentation can be found at https://vuejs-templates.github.io/webpack



C:\Users\lenovo>cd  yb

C:\Users\lenovo\yb>npm run dev

> yb-vue@1.0.0 dev C:\Users\lenovo\yb
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 13% building modules 28/31 modules 3 active ...ndex=0!C:\Users\lenovo\yb\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
 95% emitting

 DONE  Compiled successfully in 7072ms                                                                       上午9:46:47

 I  Your application is running here: http://localhost:8080

全部评论

(1) 回帖
加载中...
话题 回帖