第十三章:vue的初始化配置

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS E:\1111> vue-cli -v
vue-cli : 无法将“vue-cli”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ vue-cli -v
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (vue-cli:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS E:\1111> npm install vue-cli -g
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
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 or higher. Older versions may use Math.random() in certain circumstances, whichC:\Users\Administrator\AppData\Roaming\npm\vue -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue
C:\Users\Administrator\AppData\Roaming\npm\vue-init -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init
+ vue-cli@2.9.6
added 245 packages from 230 contributors in 81.005s
PS E:\1111> npm install webpack -g
C:\Users\Administrator\AppData\Roaming\npm\webpack -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
+ webpack@5.70.0
added 71 packages from 121 contributors in 21.109s
PS E:\1111> npm init webpack
npx: 1 安装成功,用时 6.585 秒
找不到命令:create-webpack
PS E:\1111> npm create-webpack wei

Usage: npm <command>

where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami

npm <command> -h quick help on <command>
npm -l display full usage info
npm help npm involved overview

C:\Users\Administrator\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@6.14.16 D:\nodejs\node_modules\npm

PS E:\1111> npm init webpack wei
npx: 1 安装成功,用时 3.984 秒
找不到命令:create-webpack
PS E:\1111> webpack --version
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 'E:\1111\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'E:\1111\package.json'
npm WARN webpack-cli@4.9.2 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/configtest@1.1.1 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN 1111 No description
npm WARN 1111 No repository field.
npm WARN 1111 No README data
npm WARN 1111 No license field.

+ webpack-cli@4.9.2
added 50 packages from 39 contributors in 12.108s

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

Error: Cannot find module 'webpack-cli/package.json'
Require stack:
- C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
at Function.resolve (internal/modules/cjs/helpers.js:107:19)
at runCli (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:65:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
code: 'MODULE_NOT_FOUND',
'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\webpack\\bin\\webpack.js'
]
}
PS E:\1111> npm init webpack wei
终止批处理操作吗(Y/N)?
^C
PS E:\1111> npm init webpack
npx: 1 安装成功,用时 6.685 秒
找不到命令:create-webpack
PS E:\1111> npm install
npm WARN saveError ENOENT: no such file or directory, open 'E:\1111\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\1111\package.json'
npm WARN @webpack-cli/configtest@1.1.1 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.9.2 requires a peer of webpack@4.x.x || 5.x.x but none is installed. You must install peer dependencies yourself.
npm WARN 1111 No repository field.
npm WARN 1111 No license field.

up to date in 1.487s

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

PS E:\1111> vue --version
2.9.6
PS E:\1111> vue init webpack wei

? Project name wei
? Project description 1.0.1
? Author yuan
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Airbnb
? 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 "wei".


# 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.4 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. 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 or 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 querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 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 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
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 E:\1111\wei\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\ADMINI~1\AppData\Local\Temp\2.46\chromedriver\chromedriver_win32.zip
Received 782K...
Received 1566K...
Received 2350K...
Received 3134K...
Received 3918K...
Received 4523K total.
Extracting zip contents
Copying to target path E:\1111\wei\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at E:\1111\wei\node_modules\chromedriver\lib\chromedriver\chromedriver.exe

> core-js@2.6.12 postinstall E:\1111\wei\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.59 postinstall E:\1111\wei\node_modules\es5-ext
> node -e "try{require('./_postinstall')}catch(e){}"


> uglifyjs-webpack-plugin@0.4.6 postinstall E:\1111\wei\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":"x64"})
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":"x64"})
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.

added 1845 packages from 1120 contributors in 547.392s

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

 

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


> weishuwen@1.0.0 lint E:\1111\wei
> eslint --ext .js,.vue src test/unit test/e2e/specs "--fix"


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

To get started:

cd wei
npm run dev

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


PS E:\1111>

posted @ 2022-03-23 11:20  快乐的时光机  阅读(3143)  评论(0编辑  收藏  举报