Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
657 views
in Technique[技术] by (71.8m points)

node.js - node-sass installation issue on windows 10

I have installed node js latest version(8.8.1) and npm latest version(5.5.1) and when i try to install node-sass i get this:

npm install -g node-sass

C:UsersGiannisAppDataRoaming pm ode-sass -> C:UsersGiannisAppDataRoaming pm ode_modules ode-sassin ode-sass

node-sass@4.5.3 install C:UsersGiannisAppDataRoaming pm ode_modules ode-sass node scripts/install.js

'node' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.5.3 install: node scripts/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.5.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:UsersGiannisAppDataRoaming pm-cache_logs2017-10-26T11_57_10_751Z-debug.log

I have set the system variable C:Program Files odejs

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

node-sass requires node-gyp https://github.com/sass/node-sass#install

node-gyp requires windows-build-tools https://github.com/nodejs/node-gyp#on-windows

Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...