How to solve npm ERR! code 1 , path node-sass command failed on windows while learning react.
Hey happy new year 2024 !
I have been switching to windows for a c# project.
After importing my node js project from linux, i try to setup it and install it’s libraries.
I meet two big problems :
- My node installation become too slow.
- At the end of several minutes of waiting, i have these error:
Problem
npm ERR! code 1 npm ERR! path C:\react_root_project_path\node_modules\node-sass npm ERR! command failed
I make lot of research and test to find this solution that look very simple yet, difficult to realize.
How to solve npm ERR! code 1 , path node-sass command failed
To solve this error , here the solution i use to solve it!
- i remove node-sass line in package.json file
- i reinstall packages using the command below
npm install
This last command reinstall all missing packages.
If it doesn’t work in your case, you can completly reinstall your apps libraries. I think that is the most efficient and complete solution to avoid any unpredicated issues.