简体   繁体   中英

Installing node-sass errors with 'ELIFECYCLE'

I install npm and work, but I can not install node-sass. The next message following;

npm ERR! Linux 4.15.0-39-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "scss"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! one@1.0.0 scss: `node-sass -watch scss -o css`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the one@1.0.0 scss script 'node-sass -watch scss -o css'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the one package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-sass -watch scss -o css
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs one
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls one
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/maty/Desktop/MyFirstProyect/npm-debug.log

I install sass use;

npm install node-sass sudo npm install -g sass

I checked the version, I made an easy sass code example.

Someone, could you help me?

Check your node version and node-sass version. Mine was "node-sass":"4.5.3" node version i changed that too "node-sass":"^4.6.0" (change this based on your node version by referring the below attached image) in package.json dev dependency and ran npm install. Installation was success and working fine.try this 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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