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

expo-cli not spawned on 'expo start' - ENOENT error #48

Closed
blakew opened this issue Sep 26, 2018 · 5 comments
Closed

expo-cli not spawned on 'expo start' - ENOENT error #48

blakew opened this issue Sep 26, 2018 · 5 comments
Labels

Comments

@blakew
Copy link

blakew commented Sep 26, 2018

Description

expo start throws an ENOENT error using the latest expo-cli and following a successful expo init

Steps:

  1. Installed the new expo-cli - yarn global add expo-cli
  2. Ran expo init in a fresh directory
  3. Updated package.json, built my project
  4. When I ran expo start, it didn't recognize expo-cli as being installed and threw an error when trying to install it (see below)
  5. When I run expo-cli start, the project builds, devtools opens and expo works as expected

Expected Behavior

Expect expo start to work without having to invoke expo-cli

(By the way is there any difference?)

Observed Behavior

> expo start

This command requires Expo CLI.
Do you want to install it globally [Y/n]? Y
Installing the package 'expo-cli'...
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Environment

Please run expo diagnostics in the project folder and copy the output here:

I get the exact same error as above.

Windows 10

@blakew
Copy link
Author

blakew commented Sep 27, 2018

I'm having a similar problem with jest-expo, where the jest command doesn't seem to spawn any child process and just exits right away. I have to run node .\node_modules\jest\bin\jest.js to get it to work.

Updated to the latest node for Windows (8.11.3 -> 8.12.0) and it doesn't make a difference.

@blakew
Copy link
Author

blakew commented Sep 29, 2018

Closing per expo/expo#2306 (comment)

@blakew blakew closed this as completed Sep 29, 2018
@inetkid
Copy link

inetkid commented Nov 14, 2018

For me, expo init missed out some modules. npm install works for me.

@ghasemikasra39
Copy link

same issue. no solution?

@NafaaAzaiez
Copy link

NafaaAzaiez commented Feb 12, 2019

Try installing node and npm before, then npm install -g expo-cli

@lock lock bot added the outdated label Aug 11, 2019
@lock lock bot locked and limited conversation to collaborators Aug 11, 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