Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Expo Init Error with error code 1 #318

Closed
henrychen0220 opened this issue Jan 21, 2019 · 3 comments
Closed

Expo Init Error with error code 1 #318

henrychen0220 opened this issue Jan 21, 2019 · 3 comments
Assignees
Labels

Comments

@henrychen0220
Copy link

Description

Currently I am trying to start developing a React-Native Application by following the tutorial on its official website, https://facebook.github.io/react-native/docs/getting-started. As a reach step 2, which is initializing the project by calling expo init AwesomeProject, I encountered an error during the initialization when it is installing dependencies.

Expected Behavior

The expected behavior for this is successfully finish running without encountering any error, and allow me to continue on with the tutorial process.

Observed Behavior

An error log is generated with exit status 1.

image

Environment

image

Reproducible Demo

  1. Update Node to the latest version 10.15.0
  2. Update Npm to the latest version 6.6.0
  3. Install Expo by executing npm install -g expo-cli
  4. Run expo init AwesomeProject and the error will appear
@NanheKumar
Copy link

NanheKumar commented Feb 19, 2019

Facing similar issue . macOS Mojave ( 10.14.2). Node version : v10.15.1, npm version : 6.4.1.
Installed expo-cli through bellow command.

npm install -g expo-cli

creating new project "AwesomeProject":

expo init AwesomeProject

? Choose a template: expo-template-blank
? Choose which workflow to use: managed
✔ Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration · 100% completed
[14:11:59] Extracting project files...
[14:12:00] Customizing project...
[14:12:03] Initialized a git repository.
[14:12:03] Installing dependencies...
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b v0.22.1-exp.0 git://github.com/expo/react-native-maps.git /Users/a1/.npm/_cacache/tmp/git-clone-0bb1cd6d
npm ERR! /Users/a1/.npm/_cacache/tmp/git-clone-0bb1cd6d/.git: Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a1/.npm/_logs/2019-02-19T08_42_32_124Z-debug.log
[14:12:32] Process exited with non-zero code: 1
[14:12:32] Set EXPO_DEBUG=true in your env to view the stack trace.
screen shot 2019-02-19 at 2 27 34 pm

@NanheKumar
Copy link

NanheKumar commented Feb 19, 2019

Finally I solved the issue

**

npm install -g npm

**

screen shot 2019-02-19 at 6 18 24 pm

**

sudo expo init AwesomeProject

**

screen shot 2019-02-19 at 6 22 10 pm

@henrychen0220
Copy link
Author

Hello,

The problem is resolved by using yarn as dependency installer instead of npm.

  1. Go to the yarn download website https://yarnpkg.com/lang/en/docs/install/#windows-stable and install yarn on your local machine.
  2. Navigate to the directory you want to create your new project and do expo init "project-name".
  3. When the init ask for whether you want to use yarn, select yes

Doing the above steps makes the expo init successful on my laptop.

@lock lock bot added the outdated label Sep 4, 2019
@lock lock bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants