DEV Community

Cover image for Fix npx create-react-app stuck or hangs when installing or react dependencies getting stuck during npm install
Ayush Agarwal
Ayush Agarwal

Posted on

Fix npx create-react-app stuck or hangs when installing or react dependencies getting stuck during npm install

I have encountered this scenario a few times during installation of create-react-app or when installing react dependencies. There are various solution for this kind of problem. I am listing all of them below in three different stages, try them out accordingly : -

  1. First Stage

    • npm config set registry http://registry.npmjs.org/ --global
    • npm cache clear --force
    • Delete your package-lock.json file(it will automatically get created after npm i).
    • Now try for npm install
  2. Second Stage

    • In your project directory type
    • npm init
    • npm update
    • Restart your IDE
    • Try installing dependency again
  3. Third Stage

    • Unistall node and npm
    • Reinstall node again

These solutions worked for me, and I hope it works for you as well!.

Top comments (0)