2023-11-10 02:44PM
试用 vue
创建一个基于 webpack 模板的新项目:
$ vue init webpack my-project
却报错说:
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 ERR! code 1
npm ERR! path /home/meiyi/workspace/my-project/node_modules/chromedriver
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
npm ERR! Downloading from file: https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip
npm ERR! Saving to file: /tmp/2.46/chromedriver/chromedriver_linux64.zip
npm ERR! (node:175276) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! ChromeDriver installation failed Error with http(s) request: Error: read ECONNRESET
npm ERR! A complete log of this run can be found in: /home/meiyi/.npm/_logs/2023-11-08T08_41_33_471Z-debug-0.log
解决方法:
1. 使用 $ npm install svgo@latest命令
2. 使用 $ npm install core-js@latest 命令
3. 使用 $ npm install eslint --save-dev
命令
4. 使用 $ npm install -g npm 命令
5 .使用 $ nvm install node 命令
6. 使用 sthp-linux proxy (详细过程,可以看这篇文章内容)
1)先使用 $ ./sthp-linux -p 8090 -s 127.0.0.1:1090
2) 然后使用 $ source ~/env_source_env
3) 最后使用 $ echo $HTTP_PROXY
7. 最后重新运行 $ vue init webpack my-project ,就发现已经可以了
details.
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 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
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.
added 1892 packages in 4m
登录
请登录后再发表评论。
评论列表:
目前还没有人发表评论