Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
655 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

[email protected] 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! [email protected] install: node scripts/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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 Answer

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...