npm err! code elifecycle
The ELIFECYCLE
error corresponds neither to a syntax error in the code nor to a permission problem because other sentences are then used to notify the error.
It is very common type of error that occurs during npm operation on our command prompt or our terminal
Step 1: Cleaning the Cache
npm
stores the cache data that name is the_cacache
.- It stores all the HTTP request data as well as other package related data.
npm cache clean --force
The npm cache clean
command clears the npm cache. Add the --force
argument to force the operation.
Step 2: Delete node_modules & package-lock.json file
rm -rf node_modules && rm ./package-lock.json
- The arguments
r
andf
indicate respectively to delete the subfolders and to force the deletion without asking for confirmation.
Step 3: Installing again the node modules
npm install
The npm install
will trigger a full download and installation of modules you need in your application.
Step 4: For start again
npm start npm run dev
The Above will remove the errors. Kindly make sure that
node_modules
folder installing again at the same location