npm install 报node-sass错误

npm ERR! errno 1

npm ERR! [email protected] postinstall: `node scripts/build.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the [email protected] postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

原因:npm install 的时候所下载的node-sass文件夹是空的

在C:\Users\姓名\AppData\Roaming\npm-cache\node-sass\3.13.1\下面可以看到

解决方法:

自己单独用npm i node-sass 下载一遍

会在C:\Users\姓名\AppData\Roaming\npm-cache\node-sass\4.7.2\下面会有一个文件win32-x64-57_binding.node 把这个文件复制到3.13.1下面然后重新npm install就解决了

你可能感兴趣的:(npm install 报node-sass错误)