当前位置:首页 > 技术教程 > 正文

npm install常见四种报错情况以及解决方案

今天介绍一下npm install常见四种报错情况以及解决方案:

报错一:

while

parsing near ... npm ERR! errno -4048 npm ERR! syscall scandir

解决方案

npm cache clean --force npm install

报错二:

npm install常见四种报错情况以及解决方案 第1张

解决方案

1.删除NPM文件夹uuModules下的节点 2. 删除当前项目文件夹的node_modules 3. 删除package-lock.json文件 4. npm cache clean --force 5. npm install

报错三:

npm install常见四种报错情况以及解决方案 第2张

npm ERR!chromedriver@2.46.0install:`node install。js` npm ERR! Exit status 1 npm ERR! deasync@0.1.21 install: `node ./Build. js` npm ERR! Exit status 1 npm ERR! phantomjs-prebuilt@2.1.13 install: `node install.js` npm ERR! Exit status 1

解决方案

类似企业所有的执行 node 命令的报错,基本都可以用我们这个研究方法进行解决# npm install --ignore-scripts npm install deasync@0.1.21 --ignore-scripts

报错四:

Cannot download ‘xxxx‘ HTTP error 404 Not Found

解决方案

默认下载路径上无法找到对应的资源文件,直接手动修改包的下载地址即可# Binary site https://npm.TaoBao. Organization / mirror / node sass Phantom= http://10.25.220.15:8080

以上是关于“npm install常见四种报错情况以及解决方案”的相关介绍,如需购买云服务器,推荐使用 西西云,独享IP,弹性灵活各种配置任您选配,最低只需要43/月,免费帮助配置环境,挂载磁盘等,协助处理简单问题,同时提供快速 0元备案,让您快速运营,详情请咨询西西云。产品选购地址: https://www.kufanyun.com/server/buy.html

npm install常见四种报错情况以及解决方案 第3张

0