2021-06-30 vue 安装webpack包时遇到npm ERR!的解决办法

目录

    • 尚硅谷的webpack的建议安装包
    • 提示npm ERR!报错

尚硅谷的webpack的建议安装包

npm install -D webpack@4.41.5 webpack-cli@3.3.10 webpack-dev-server@3.10.2
npm install -D html-webpack-plugin clean-webpack-plugin  ts-loader cross-env

提示npm ERR!报错

PS F:\02前端2021\06-vue\尚硅谷\typescript\03webpack_ts> npm install -D [email protected] [email protected] [email protected]
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: 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 [email protected]: The
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

added 619 packages, and audited 621 packages in 53s

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

7 vulnerabilities (2 low, 5 moderate)

To address issues that do not require attention, run:
  npm audit fix

To address all issues, run:
  npm audit fix --force

Run `npm audit` for details.

推测是电脑的npm包太新了,将电脑npm降级即可完成安装

npm install -g npm@6.14.8

##最后用 npm audit fix来修复一下就能成功安装了

你可能感兴趣的:(vue)