ERROR in Cannot find module 'node-sass'
Here's the solution:
sudo npm install --save-dev --unsafe-perm node-sass
Enjoy!
- This error is for node-sass is not present ... to solve this just you want to run following command
npm install node-sass
According to node-sass github page, supported node.js version vary release by release.
https://github.com/sass/node-sass
Example:Check the version of node you are running.
node -v-> v12.0.0
you need node-sass v4.12+. so you can
npm install node-sass@4.12.0
or if 4.12.0 is the latest
npm install node-sass@latest
(npm install node-sass
will install the latest version in many cases, but remember that it does not always install the latest(in this example 4.12.0) if dependency in package.json is written like ^3.0.0, ~4.11.0)What's the difference between tilde(~) and caret(^) in package.json?
Lastly, using sudo with npm is not a good practice. Please refer to this article. https://medium.com/@ExplosionPills/dont-use-sudo-with-npm-still-66e609f5f92