I found lots of issues with offered solutions on node using cpu but no one solved my problem - mostly it was said to install fsevents and rebuild, remove node modules and reinstall. Also was offered to add poll:false, but I'm not sure I have web-pack. I'm practicing sass so it's a very simple app having only sass installed as a node module, and the script is:
"scripts": {
"compile:sass": "node-sass sass/main.scss css/style.css -w"
}
So all I use is live-server and npm run compile:sass.
Versions: node-sass: "^4.14.1", Node: "^14.15.0"
I tried to see what's going on with node cpu consumption when running other apps that do not include that script, and the consumption was adequate.
Besides all of that I tried to change versions of node-sass (to 4.13.1) and nodejs (to 14.15.4) and also I deleted the node-sass globally.
Does anyone know what can be the solution?
The problem was in live-server - not in nodejs or node-sass as I thought.
If I understand right, live-server watched node_modules folder which had node-sass watching as well, and that caused such CPU load.
Once node_modules will be ignored by live-server, the problem is solved.