Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node-sass command not found when compiling

I have a problem with SASS for node.js on Mac (OS X El Capitan)

When i trying compile a scss file to css using command 'node-sass -o css sass/style.scss' I get the following error:

node-sass: command not found

What's the problem and how i can solve it?

like image 691
Jameson Avatar asked Sep 05 '16 12:09

Jameson


Video Answer


2 Answers

try this: npx node-sass -o css sass/style.scss

npx will check whether <command> exists in $PATH, or in the local project binaries, and execute it. The more detail explanation is here

like image 110
hustnzj Avatar answered Sep 18 '22 13:09

hustnzj


This helped me:

sudo npm install --unsafe-perm -g node-sass
like image 41
vladanPro Avatar answered Sep 21 '22 13:09

vladanPro