close

[Solved] npm ERR! code ELIFECYCLE

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run my react project with npm start command But I am facing following error npm ERR! code ELIFECYCLE in ReactJS. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How this Error Occurs ?

I am trying to run my react project with npm start command But I am facing following error.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

How To Solve npm ERR! code ELIFECYCLE Error ?

  1. How To Solve npm ERR! code ELIFECYCLE Error ?

    To Solve npm ERR! code ELIFECYCLE Error You Just need to run this command One by one. First of all Just delete package-lock.json file and then Run this command: npm cache clean –force Then Just run this command: npm install Now, You can Run Your Project with this command: npm start Now, Your Error must be solved.

  2. npm ERR! code ELIFECYCLE

    To Solve npm ERR! code ELIFECYCLE Error You Just need to Clean cache and Node_module and some other stuff inorder to resolve this error. First of all Just clean cache with this command: npm cache clean –force Then, Delete node_modules folder from your project. Now, Just delete package-lock.json file also. Then Run npm install Command. Now, You can run your project without Any error.

Solution 1: Clean cache and Node_module

You Just need to Clean cache and Node_module and some other stuff inorder to resolve this error. First of all Just clean cache with this command.

npm cache clean --force

Then, Delete node_modules folder from your project. Now, Just delete package-lock.json file also. Then Run npm install Command. Now, You can run your project without Any error.

Solution 2: Run this command

You Just need to run this command One by one. First of all Just delete package-lock.json file and then Run this command.

npm cache clean --force

Then Just run this command.

npm install

Now, You can Run Your Project with this command.

npm start

Now, Your Error must be solved.

Solution 3: npm run clean

First of all Clean your project with this command.

npm run clean

Then Just delete your node_modules folder manually Or with this command.

rm -rf node_modules

Then, Just run npm install command to install all packages.

npm install

Now, You can run your app.

npm start

Now, error should be solved.

Solution 4: Run this command.

Just run this command to delete node_modules folder and package-lock.json file and then run npm install. It worked perfectly.

rm -rf node_modules && rm ./package-lock.json && npm install

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment