Node-sass is not recognized by command line

npm commands check "node_package" folder and try to run things there. You can try

npx run scss 

to install scss and then run it, even if it is not installed before.


You need to install it globally

npm install -g node-sass

Or add it in package.json

"devDependencies": {
    "node-sass": "4.5.0"
},
"scripts" : {
    "node-sass": "node-sass --output-style compressed -o dist/css src/scss"
}

And then do
1. npm i, which in this case would be similar to npm install --save-dev node-sass
2. npm run node-sass

Reference: npm scripts, npm-run-scripts


You can simply run this code

  1. npm install -g sass
  2. sass --watch sass:css

Hopefully work