周五按照网上教程进行按照,报错再百度搜索找方案。之前一直在vue-devtools文件夹中使用git bash进行cnpm install安装不成功,报各种依赖包不支持。报错类似如下:
npm WARN … requires a peer of react@^16.4.0 but none is installed
报错内容过多,需要安装依赖包太多。然后将npm版本号降到6.0.1,报错更多。类似
npm WARN npm npm does not support Node.js v14.16.0 npm WARN npm You should p
然后卸载node。再进行安装还是如此。周一上班开机后继续折腾,结果可行。记录步骤如下:
一、报错
1、在vue-devtools目录下git bash 执行安装命令 $ cnpm install
报错error:
可能cnpm未安装
2、执行 $npm install
报错error:
3、使用 win+R打开cmd 执行命令npm install
报错error:有警告有报错
4、继续执行npm install cnpm -g --registry=https://registry.npm.taobao.org (安装淘宝镜像)
报错error:
npm WARN deprecated [email protected]: this library is no longer supported
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]: request has been deprecated, see https://github.com/request/request/issues/3142
removed 384 packages, and changed 378 packages in 2m
3 packages are looking for funding
run `npm fund` for details
百度搜索:
提示内容,部分内容不再维护,可以继续安装,影响不大
5、执行npm config set registry https://registry.npm.taobao.org (设置源)无反应,然后执行
npm start
报错error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:Userslinger/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open ‘C:Userslingerpackage.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:UserslingerAppDataLocal pm-cache_logs?1-12-20T07_07_01_655Z-debug-0.log
5、继续执行npm install nrm -g (npm升级到最新版本) 有报错但是也正常安装
npm WAR