解决方案:
npm config get registry 查看镜像源
npm config set registry=https://registry.npm.taobao.org 如果镜像源不是国内淘宝就执行这条,这样运行会快点
报错:EPERM npm ERR! syscall unlink npm ERR! path D:\vsws\mmp-web-mmp-web-dev\node_modules.staging\antd-a
方案:
1、npm cache clean --force
报错:npm install 报错 -----Cannot download "node-sass”
The build tools cannot be installed without administrative rights. To fix, r
原因:windows平台缺少编译环境
为node-gyp配置安装python2.7以及VC++ build Tools依赖
方案:
2、 npm install -g node-gyp
3、npm install --global --production windows-build-tools
报错:The build tools cannot be installed without administrative rights.To fix, right-click on PowerShell and run “as Administrator”.
l以管理员身份运行上面代码
方案:
4、npm uninstall node-sass
5、npm install node-sass
以上五步骤