npm install and npx initialization of react, expo, and next apps hanging
Answered
Manx posted this in #help-forum
ManxOP
Hello, I was recently following a tutorial to learn how to build my first react-native app, and the tutorial used the command
I ran the command, and expected it to take a couple of seconds at most to create one. However, after hours of leaving it alone, no progress was achieved.
The same behaviour is observed with
In Windows Powershell, I have achieved verbose-like output with the following commands:
And then it pauses.
Methods Tried
1. Restart my computer (several times)
2. Uninstall and reinstall Node.js multiple times (including once with fnm Fast Node Manager)
3. Install different version of Node.js (including v18.20.4 LTS, v20.15.1 LTS, and v22.5.0
4. Tried the commands from Windows CMD (as well as running it as admin), Windows Powershell, and from VS Code
5. Tried to set registry using npm config set registry http://registry.npmjs.org/ --global (no progress)
6. Tried to clear cache npm cache clear --force (no progress)
7. Install create-expo-app globally and then use it (no progress)
8. Installing with Yarn (gets stuck at an empty progress bar)
System Information
npm install??
Another issue of mine that may be related is that running
npx create-expo-app@latest my-app. I ran the command, and expected it to take a couple of seconds at most to create one. However, after hours of leaving it alone, no progress was achieved.
The same behaviour is observed with
create-react-app and create-next-app. At most, the spinning load wheel is spun for a couple of seconds before hanging indefinitely. Ctrl + C works at terminating the batch job.In Windows Powershell, I have achieved verbose-like output with the following commands:
>>> $env:DEBUG="*"
>>> npx create-expo-app my-app
expo:init:cli Default args:
expo:init:cli { _: [ 'my-app' ] } +0ms
expo:init:cli Parsed:
expo:init:cli { args: {}, projectRoot: 'my-app' } +8msAnd then it pauses.
Methods Tried
1. Restart my computer (several times)
2. Uninstall and reinstall Node.js multiple times (including once with fnm Fast Node Manager)
3. Install different version of Node.js (including v18.20.4 LTS, v20.15.1 LTS, and v22.5.0
4. Tried the commands from Windows CMD (as well as running it as admin), Windows Powershell, and from VS Code
5. Tried to set registry using npm config set registry http://registry.npmjs.org/ --global (no progress)
6. Tried to clear cache npm cache clear --force (no progress)
7. Install create-expo-app globally and then use it (no progress)
8. Installing with Yarn (gets stuck at an empty progress bar)
System Information
Windows 11
>>> node -v
v22.5.0
>>> npm -v
10.8.2npm install??
Another issue of mine that may be related is that running
npm install hangs as well, whether that be installing react-native or expo-font. Using --verbose reveals that the command tends to hang at the same registry packages too (it almost always hangs after fetching eastasianwidth or path-exists).Answered by Manx
I was playing around in Powershell and ran the command in my root folder, which for some reason worked
In the past, I was running it in my Documents folder, and sure I switched around subfolders to make sure the folder permissions weren't the problem, but it still didn't work
It's not technically a full solution though becuase I still have no idea why creating an expo project within any folder in Documents doesn't work
I have full read/write permissions...
In the past, I was running it in my Documents folder, and sure I switched around subfolders to make sure the folder permissions weren't the problem, but it still didn't work
It's not technically a full solution though becuase I still have no idea why creating an expo project within any folder in Documents doesn't work
I have full read/write permissions...
15 Replies
Gull Dong
ive had the same issue ;-;
@Gull Dong ive had the same issue ;-;
ManxOP
Any luck on fixing it? I've only seen one other person with a similar issue, and there was no solution 😔
Gull Dong
naw i have no clue
ManxOP
Dam
Anybody else you know with the same issue?
Gull Dong
just me so far
and ig you
ManxOP
😭
I'm thinking of trying it out on a another computer as soon as I can get my hands on one
Other than that, ig we can open an issue on Github...
Other than that, ig we can open an issue on Github...
Gull Dong
i wish you luck 🫡
@Gull Dong i wish you luck 🫡
ManxOP
I managed to find a workaround
The solution makes me feel kind of stupid too 😅
The solution makes me feel kind of stupid too 😅
ManxOP
I was playing around in Powershell and ran the command in my root folder, which for some reason worked
In the past, I was running it in my Documents folder, and sure I switched around subfolders to make sure the folder permissions weren't the problem, but it still didn't work
It's not technically a full solution though becuase I still have no idea why creating an expo project within any folder in Documents doesn't work
I have full read/write permissions...
In the past, I was running it in my Documents folder, and sure I switched around subfolders to make sure the folder permissions weren't the problem, but it still didn't work
It's not technically a full solution though becuase I still have no idea why creating an expo project within any folder in Documents doesn't work
I have full read/write permissions...
Answer
ManxOP
@Gull Dong I wish you luck in fixing your problem too! If you want to try, maybe try running the command in your root user folder, or even in Downloads? That's what worked for me...
Gull Dong
mine continues to hang regardless of directory so idk. glad you got it working, tho
ManxOP
Thanks bro, I really hope you get yours fixed too