How to solve npm error "npm ERR! code ELIFECYCLE"
Step 1: $ npm cache clean --force
Step 2: Delete node_modules by $ rm -rf node_modules
(rmdir /S /Q node_modules
in windows) folder or delete it manually by going into the directory and right-click > delete / move to trash. If are not updating your packages you can delete the package-lock.json
file too.
Step 3: npm install
To start again,$ npm start
This worked for me. Hopes it works for you too.
PS: Still if it is there, kindly check the error it is displaying in red and act accordingly. This error is specific to node.js environment. Happy Coding!!
Cleaning Cache
and Node_module
are not enough.Follow this steps:
npm cache clean --force
- delete
node_modules
folder - delete
package-lock.json
file npm install
It works for me like this.
I resolve this error running following code
npm cache clean
then delete node_modules
directory from my project structure manually or with following command
rm -rf node_modules
After That install dependencies again using
npm install