expo cli doesnt work for me

i try to npm start but all the time the same error …
if someone know treat this issue it will help .
bdw, i installed latest ver of node and expo cli globaly.

internal/modules/cjs/loader.js:895
throw err;
^

Error: Cannot find module ‘C:\Users\Roei\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1143:12)
at internal/main/run_main_module.js:16:11 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}

1 Like

Hi.
See if installing node 12.x or 10.x works better than 13.x.

I received the same error after attempting to upgrade to the newest expo version using
npm install -g expo-cli

node version is 12.8
npm version 6.10.2
platform: Windows 10

Installing via the command line as admin did not solve the issue either
Checking the path shows that expo-cli is not being installed
Additionally, I was unable to install the package locally

Actual error:

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15)
    at Function.Module._load (internal/modules/cjs/loader.js:618:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}```

The relevant portion of the npm install failure appears to be : 
`Failed at the libxmljs@0.19.7 install script`

Which might be connected to this thread: https://github.com/libxmljs/libxmljs/issues/557

However, I do not see any mentions of minipass version 2.8.4 in the expo-cli yarn.lock file

If I run expo init using expo-cli 3.7.1 on Linux I get the following in yarn.lock:

minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
  version "2.9.0"
  resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
  integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
  dependencies:
    safe-buffer "^5.1.2"
    yallist "^3.0.0"

So at least in my case it’s getting minipass 2.9.0. Pretty sure it should do the same on Windows.

I have not tried Expo on Windows, but there are three different environments that you could do it in and perhaps one of the others will work better for you.

In theory, using Ubuntu on WSL will work exactly like a native Linux machine, so that’s what I would try.
The other two options are CMD and PowerShell.

How/where were you running expo?

I’m also unable to upgrade expo-cli higher than 3.4.1 using Windows 10.

It’s definitely related to the libxml.js library. In my case it wants an older version of python than installed on my machine.

This problem didn’t happen with with versions of expo-cli =< 3.4.1.

And if I install a version of Python it likes it then is requiring the install of Visual Studio. :unamused:

Can you try installing WSL and then installing node and expo-cli within that? There are some notes about how to do that here:

https://docs.expo.io/versions/latest/distribution/building-standalone-apps/#1-install-expo-cli

hi @wodin. Thanks for the help.
Same problem… but different.

OK, so it still wants to compile stuff. In order to set up a basic environment that will allow you to compile C code, do this:

apt install build-essential

If it still fails, please post the error as text like this:

```
output
here
```

The text is easier to search for if someone else has the same problem and can also be easier for me to copy’n’paste into Google if necessary :slight_smile:

hi, that what i get all the time…and i use ver 3.4.1 coz it doesnt let me install the latest globlal.
i also use before node 12.x and it doesnt work also .
please help me .

E:\ReactNative\navigation_app>npm start

> @ start E:\ReactNative\navigation_app
> expo start

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                          │
│   There is a new version of expo-cli available (3.8.0).                                                                                  │
│   You are currently using expo-cli 3.4.1                                                                                                 │
│   Install expo-cli globally using the package manager of your choice; for example: `npm install -g expo-cli` to get the latest version   │
│                                                                                                                                          │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Starting project at E:\ReactNative\navigation_app
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
ConfigUtils(...).configFilenameAsync is not a function
Set EXPO_DEBUG=true in your env to view the stack trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Roei\AppData\Roaming\npm-cache\_logs\2019-11-19T07_35_53_222Z-debug.log

Hi @roei133

Can you try installing WSL and Ubuntu as per my earlier post. Then, at the bash prompt, run:

apt install build-essential

Then download and install the Linux version of node.
Then install expo-cli within Ubuntu.
Then try expo init, expo start, etc.

1 Like

what is WSL ?? and why expo suddenly doesn’t work with windows 10 ?

Hi

WSL is Windows Subsystem for Linux.

I have never used expo on Windows and I am not part of the Expo team so anything I say is not Expo’s official policy, although I try not to say anything that is incorrect or misleading.

I am not saying that expo no longer works on Windows 10. I am saying that maybe it will work better for you if you try running it on WSL.

do you think that expo isnt good as the react native cli ?
what do you suggest me to use ?

I think Expo is great as a CLI for React Native projects.

If I were running it on Windows I would probably run it on WSL, but I am not telling you that you must use WSL. I am just trying to suggest an alternative way of running expo because you are having problems with the way you are currently running it.

That worked. Thanks wodin. At least I know it works in linux.

I’d prefer to not have to move my local databases and Docker over to WSL just to get up and running again. I’m sticking with 3.4.1 for now.

This definitely needs to be looked at by someone at Expo for Windows though. Others are also having the issue.

My error is exactly like this how did you fix it?

Hi, if u wanna fix it so do what I did …

  1. Delete node & delete expo and restart ur machine.
  2. Install:
    node v12.10.0
  3. Install:
    npm install -g expo-cli@3.5.0
  4. Smile and give me like!!

not working at all

Error goes like this anyone knows please help guys