How to solve npm error “npm ERR! code ELIFECYCLE”

后端 未结 30 2902
死守一世寂寞
死守一世寂寞 2020-11-22 02:33

I\'m trying to learn react, so I have this sample code for the full-stack react voting app, and I am trying to get it to work but after running npm install followed by npm s

30条回答
  •  猫巷女王i
    2020-11-22 02:35

    Step 1: $ npm cache clean --force

    Step 2: Delete node_modules by $ rm -rf node_modules package-lock.json folder or delete it manually by going into the directory and right-click > delete / move to trash. Also, delete 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!!

提交回复
热议问题