简体   繁体   English

执行npm安装时出现节点sass错误

[英]Node sass Error while doing npm install

i was trying to do an npm install command, But ended up with an error related node sass. 我试图执行npm install命令,但最终出现与节点相关的错误。

I learning react/redux from the " https://github.com/buckyroberts/React-Redux-Boilerplate " from this. 我从这里从“ https://github.com/buckyroberts/React-Redux-Boilerplate ”学习react / redux。 and doing npm install fails. 并且执行npm安装失败。

The error is attached as image. 该错误将作为图像附加。 在此处输入图片说明 I am using windows 7, with node 6.9. 我使用的是Windows 7,节点为6.9。 any idea to solve this error? 有解决这个错误的主意吗?

This is likely a package that depends on native build tools. 这可能是一个依赖于本机构建工具的软件包。 Do you have Visual Studio installed? 您安装了Visual Studio吗? If not, try installing it first and reboot before retrying npm install. 如果不是,请尝试先安装并重新启动,然后重试npm安装。

Your issue may be related to https://github.com/sass/node-sass/issues/1379 您的问题可能与https://github.com/sass/node-sass/issues/1379有关

Step-1: open command prompt with administrator priviledges. 步骤1:使用管理员权限打开命令提示符。

Step-2: type in the following command: 步骤2:输入以下命令:

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

This will install all the dependencies required. 这将安装所有必需的依赖项。

Step-4: Now run the following command: 步骤4:现在运行以下命令:

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 : //github.com/nodejs/node-gyp#on-windows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM