Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create-react-app hangs when initializing an app

Tags:

reactjs

It's my first time trying to use it, but after executing:

create-react-app myproject

I get:

Creating a new React app in C:\project

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

[  ................] \ fetchMetadata: sill resolveWithNewModule [email protected]

And it just hangs there forever.

I'm using npm 5.6.0 and create-react-app 2.0.3 on Windows 8.

like image 835
gambit2017 Avatar asked Oct 12 '18 00:10

gambit2017


2 Answers

I had this problem, mine got stuck at

Creating a new React app in C:\project

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

[  ................] \ fetchMetadata: sill resolveWithNewModule [email protected]

The solution for me was to ensure npm is up to date by running:

npm install npm@latest -g

After this, create-react-app worked correctly.

like image 145
DBPaul Avatar answered Sep 28 '22 07:09

DBPaul


if you get stuck while running create-react-app.

just Ctrl + C to end the process in the terminal or CMD

then end task "node.exe" from task manager.(If u use windows, idk if u use mac or linux)

then run in your terminal :

  • npm install npm@latest -g
  • npm install create-react-app -g
  • npx install create-react-app (your-project-name)
  • cd (your-project-name)
  • npm start (inside your code editor, i use VSCode)

note: beware about npm and npx that i used above

hope it work

like image 32
Ronal Aldinal Avatar answered Sep 28 '22 06:09

Ronal Aldinal