npm ERR! enoent This is related to npm not being able to find a file.
npm start项目时,遇到这个问题,经查找,应该是网络不好导致包没有下载完全。
解决方案:
将npm改为cnpm!!!
(把之前的依赖包删掉)
直接安装cnpm 安装淘宝提供的cnpm,并更改服务器地址为淘宝的国内地址, 命令:
npm install -g cnpm --registry=https://registry.npm.taobao.org
之后,就正常运行命令,将npm对应改为cnpm就可~
也可以:
替换npm仓库地址为淘宝镜像地址(推荐)
命令:
npm config set registry https://registry.npm.taobao.org
查看是否更改成功:
npm config get registry
之后就把npm 改为cnpm就行了!