Search code examples
react-nativeexpoeasapple-developer

Expo update fails because it can't find "noop.js"?


I'm trying to run my React Native application, developed with Expo, on an ios device I own. Following advice from this thread, I've set the "preview" profile in eas.json to contain the following rule:

"ios": {
  "simulator": true
}

And I attempted to use the following command to build the JS bundle locally and have it served from Expo's servers:

eas update --branch preview --message "test ios version"

However, I get an extremely bizarre error that I cannot for the life of me find anywhere on the internet. The output from the above command gives the error below.

Cannot find module 'expo/bin/cli.js'
Require stack:
- C:\Users\{user}\Desktop\{my project}\noop.js
    Error: Cannot find module 'expo/bin/cli.js'
    Require stack:
    - C:\Users\{user}\Desktop\{my project}\noop.js
    Code: MODULE_NOT_FOUND

I tried reinstalling the expo cli (npm install -g expo-cli --force) in case this was the issue but obviously that did not resolve the problem. The only online resource I could find mentioning "noop.js" is this issue which seems unrelated.

What exactly is "noop.js"? It doesn't seem like other dependencies, otherwise why would it be in the root project folder? How can I create this file or otherwise get eas update to work?

I'm trying to run my React Native application, developed with Expo, on an ios device I own. Following advice from this thread, I've set the "preview" profile in eas.json to contain the following rule:

"ios": {
  "simulator": true
}

And I attempted to use the following command to build the JS bundle locally and have it served from Expo's servers:

eas update --branch preview --message "test ios version"

However, I get an extremely bizarre error that I cannot for the life of me find anywhere on the internet. The output from the above command gives the error below.

Cannot find module 'expo/bin/cli.js'
Require stack:
- C:\Users\{user}\Desktop\{my project}\noop.js
    Error: Cannot find module 'expo/bin/cli.js'
    Require stack:
    - C:\Users\{user}\Desktop\{my project}\noop.js
    Code: MODULE_NOT_FOUND

I tried reinstalling the expo cli (npm install -g expo-cli --force) in case this was the issue but obviously that did not resolve the problem. The only online resource I could find mentioning "noop.js" is this issue which seems unrelated.

What exactly is "noop.js"? It doesn't seem like other dependencies, otherwise why would it be in the root project folder? How can I create this file or otherwise get eas update to work?


Solution

  • Turns out the answer was to reinstall the eas-cli, and to also update the rule within eas.json to use the newest version:

    "cli": {
        "version": ">= 3.18.3"
    },