【无标题】

**

npm install 常见报错与解决方案

mpm ERR! Unexpected end of JSON input while parsing near …
npm ERR! errno -4048
npm ERR! syscall scandir
解决方案

npm cache clean --force

npm install
npm ERR! cb() never called!
npm ERR! This is an error with npm itself.

解决方案

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

解决方案

类似所有的执行 node 命令的报错,基本都可以用这个方法解决

**

npm install --ignore-scripts

npm install [email protected] --ignore-scripts
Cannot download ‘xxxx’
HTTP error 404 Not Found

解决方案
默认下载路径上无法找到对应的资源文件,直接手动修改包的下载地址即可
登录后复制

sass_binary_site = https://npm.taobao.org/mirrors/node-sass

你可能感兴趣的:(npm,前端,node.js)