Asfiya Shaikh
Asfiya Shaikh

Reputation: 127

Command gets stuck while installing expo-cli

I am trying to install expo-cli on Windows 10 OS for react native through npm install expo-cli --global command, but it gets stuck at this line.

enter image description here

I'm not able to figure out how to resolve it.

Upvotes: 5

Views: 7293

Answers (7)

Paulo Gesualdo
Paulo Gesualdo

Reputation: 1

For me it took 9 hours to install at Ubuntu through Windows 10 by WSL2. My suggestion is to open the Task Manager to see if is there any usage of CPU, Memory or Disc... The usage was high during all the installation, so if it is high means that the installation is not stuck, but only taking much time.

Upvotes: 0

Dani Renner
Dani Renner

Reputation: 11

I was having this same issue! What ultimately worked for me was the following command:

npm install -g expo-cli --legacy-peer-deps

Upvotes: 1

user15333462
user15333462

Reputation: 21

This might be due to wrong configuration of your node.

If you used home brew to install node.js, uninstall it and re-install node again using the package installer from the nodejs official website.

It worked for me.

Upvotes: 2

arielhad
arielhad

Reputation: 2153

For me what worked is:

  1. Start CMD as administrator
  2. Run npm cache verify
  3. Run npm install expo-cli --global --no-optional

Also, verify that you use the correct node version.

Upvotes: 1

Anupam Srivastava
Anupam Srivastava

Reputation: 21

Just wait and make sure the network connectivity is good. It took time for me too. Anything bash, cmd or powershell will do the job.

Upvotes: 2

Hackman
Hackman

Reputation: 2659

  1. run npm cache verify
  2. run npm install expo-cli --global --no-optional

this worked for me. Also, consider using Powershell instead of cmd

Upvotes: 4

brentvatne
brentvatne

Reputation: 8038

This seems to be a problem with npm and your internet connection, sadly. The expo-cli package is quite large to install so any internet connectivity issues would become clear during the several minutes it may take on the first install. I would suggest trying it again on another internet connection if possible. If you do not think that this is the problem, you can try to build it from source at https://github.com/expo/expo-cli

Upvotes: 1

Related Questions