首先粘上log
F:\BackStage>npm i
F:\BackStage>npm i
> node-sass@4.10.0 install F:\BackStage\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass@4.10.0 postinstall F:\BackStage\node_modules\node-sass
> node scripts/build.js
报此错误是因为再项目启动的时候去github上下载node_sass文件的时候下载不下来导致的,此时只需要执行
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
即可,设置npm的镜像指向淘宝就可以完成npm i命令。
如果内网中有node_sass文件也是需要设置指向,指向内网文件地址即可。