expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

expo init doesn't work.

Open adampython opened this issue 7 years ago • 18 comments

i installed nodejs, then installed expo by > npm install expo-cli --global. after installation completed, i created a new project by using

expo init firstproject i entered blank. and it was stuck on fetchmetadata.

here is my log: ? Choose a template: expo-template-blank [12:36:14] Extracting project files... [12:36:16] Customizing project... [12:36:16] Installing dependencies... [ ................] - fetchMetadata: sill pacote range manifest for p-try@^1.0.0 fetched in 748ms stuck.

Environment

Expo CLI 2.6.14 environment info: System: OS: Windows 10 Binaries: npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

New windows 10 pro x64 installation v1809 lenovo thinkpad x230

adampython avatar Dec 29 '18 09:12 adampython

i installed git, but it still got stuck. this time on: [ ................] / fetchMetadata: sill pacote range manifest for is-arrayish@^0.2.1 fetched in 1ms

adampython avatar Dec 29 '18 09:12 adampython

I was able to get over the problem by installing Yarn. For anyone experiencing the same problem, try installing yarn with npm first.

adampython avatar Dec 29 '18 17:12 adampython

was stuck at [ ................] - fetchMetadata: sill pacote range manifest for builtin-modules@^1.0.0 fetched in 905ms What Should I do ?

arn-ob avatar Jan 02 '19 17:01 arn-ob

Hi,

Maybe it is because you are using Git bash. If that is the case, then using cmd might help.

nhht77 avatar Jan 09 '19 11:01 nhht77

You can try installing deps using yarn. Also which Expo version are you @adampython @stupidArnob guys using?

amandeepmittal avatar Jan 14 '19 10:01 amandeepmittal

Hi,

Maybe it is because you are using Git bash. If that is the case, then using cmd might help.

That solved the issue for me.

SharlSherif avatar Jan 27 '19 12:01 SharlSherif

@Sharl212 please can you explain us how you did to resolve this ?

lilian131 avatar Feb 11 '19 06:02 lilian131

I installed yarn and used it.

11 Şub 2019 Pzt 09:27 tarihinde lilian131 [email protected] şunu yazdı:

@Sharl212 https://github.com/Sharl212 please can you explain us how you did to resolve this ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/expo/expo-cli/issues/280#issuecomment-462229307, or mute the thread https://github.com/notifications/unsubscribe-auth/AXqeuQCIyz4PGU26ON-4R6TRoYJlCeqtks5vMQ1rgaJpZM4Zkf9U .

adampython avatar Feb 11 '19 09:02 adampython

On Mac OSX, make sure to run npm install -g yarn before running expo init some-project.

Thank you @adampython!!!

shahzore-qureshi avatar Mar 20 '19 18:03 shahzore-qureshi

I got the solution for following error when I run expo init (in ubuntu 18.04)

Unhandled rejection Error: Command failed: /usr/bin/git clone --depth=1 -q -b v0.22.1-exp.0 git://github.com/expo/react-native-maps.git /home/saad/.npm/_cacache/tmp/git-clone-4a48c265
/home/saad/.npm/_cacache/tmp/git-clone-4a48c265/.git: Permission denied
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:970:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:189:13)
at Pipe._handle.close (net.js:597:12)
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! 
npm ERR! A complete log of this run can be found in:
npm ERR! /home/saad/.npm/_logs/2019-05-21T14_23_52_395Z-debug.log

SOLUTION: Solution A run the following commands in order: 0. sudo npm cache clean --force

  1. sudo npm install -g yarn 2.expo init MyProject
  2. Y ( to install dependencies through yarn instead of npm) For Permission Access issues use --unsafe-perm with the command along with sudo.

Solution B (NPM) 0.close all processes if running in multiple terminals... (ctrl+c)

  1. npm cache clean --force
  2. sudo apt-get remove nodejs 3.cd /usr/lib/ and then sudo rm -rf node_modules/ 4.npm cache clean --force 5.sudo apt install nodejs 6.sudo chown -R $(whoami) ~/.npm 7.sudo expo init MyProject

Saad2714 avatar May 22 '19 10:05 Saad2714

I was able to get over the problem by installing Yarn. For anyone experiencing the same problem, try installing yarn with npm first.

Very helpfull

joelzabsonre avatar Aug 02 '19 01:08 joelzabsonre

I was able to get over the problem by installing Yarn. For anyone experiencing the same problem, try installing yarn with npm first.

installing yarn worked for me

tkirankumar786 avatar Feb 18 '20 08:02 tkirankumar786

Using cmd instead PowerShell on Win10 worked for me too.

lucaslgr avatar Mar 26 '20 18:03 lucaslgr

Installing javascript dependencies can't get completed while I init a new project.

STUCK!

try other solutions in this thread?

brentvatne avatar Apr 05 '20 19:04 brentvatne

try pressing ctrl + c to cancel it then go into the project directory and run npm install

brentvatne avatar Apr 05 '20 19:04 brentvatne

I get this error invalid json response body at https://registry.npmjs.org/expo-template-blank reason: Unexpected end of JSON input while expo init and using blank template

anuraggharat avatar Jul 28 '20 07:07 anuraggharat

i was having the same problem as i type in cmd .expo init . it just hanged there and keep me on waiting. but there was a warning that actually showed that i didn't gave any attention to . that was basically the windows defender that was not allowing for the expo app to make changes to the folder . because it was trying to access memory . so what i did was, and that worked for me, that i allowed that warning or that app trying to access that specific folder. Make sure first that either you are giving access to the right app or software to use your memory by just simply checking that the folder the app is trying to access is the same as your folder in which you are trying to build your project . hope this will be helpfull for someone.

sanaarshed avatar Sep 01 '20 21:09 sanaarshed

@anuraggharat - that error means that you're having trouble connecting to the npm registry.

@sanaarshed - thanks for sharing that! hopefully it is helpful for some folks.


i'm going to close this issue and lock it, so if you are reading this at some time after september 1, 2020 then please create a new issue if you are having problems running expo init and please provide all of the information requested in the issue template (the text you see when you go to create a new issue)

brentvatne avatar Sep 02 '20 05:09 brentvatne