Node sass Error while doing npm install

只愿长相守 提交于 2019-12-13 05:43:53

问题


i was trying to do an npm install command, But ended up with an error related node sass.

I learning react/redux from the "https://github.com/buckyroberts/React-Redux-Boilerplate" from this. and doing npm install fails.

The error is attached as image. I am using windows 7, with node 6.9. any idea to solve this error?


回答1:


This is likely a package that depends on native build tools. Do you have Visual Studio installed? If not, try installing it first and reboot before retrying npm install.

Your issue may be related to https://github.com/sass/node-sass/issues/1379




回答2:


Step-1: open command prompt with administrator priviledges.

Step-2: type in the following command:

npm install --global --production windows-build-tools

This will install all the dependencies required.

Step-4: Now run the following command:

npm install node-sass

And you are good to go !

If you still face problems. Please refer to this page: https://github.com/nodejs/node-gyp#on-windows



来源:https://stackoverflow.com/questions/41077826/node-sass-error-while-doing-npm-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!