question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EAS Build Error: Unable to resolve module react/jsx-runtime from /build/workingdir/build/.../App.tsx: react/jsx-runtime could not be found within the project.

See original GitHub issue

I have a problem with eas build, it gives me this error. image

babel.config.js ->

module.exports = function (api) {
  api.cache(true);
  return {
    presets: [
      ['babel-preset-expo'],
    ],
    plugins: [
      ['@babel/plugin-transform-react-jsx', {
        runtime: 'automatic',
      }],
      ['formatjs', {
        idInterpolationPattern: '[sha512:contenthash:base64:6]',
        ast: true
      }],
      'inline-dotenv',
      'react-native-reanimated/plugin',
    ],
  };
};

eas.json ->

{
  "builds": {
    "android": {
      "release": {
        "workflow": "managed",
        "env": {
          ...
        },
        "releaseChannel": "production",
        "node": "16.2.0",
        "yarn": "1.22.5"
      }
    },
    "ios": {
      "release": {
        "workflow": "managed",
        "env": {
          ...
        },
        "releaseChannel": "production",
        "node": "16.2.0",
        "yarn": "1.22.5"
      }
    }
  }
}

I’ve tried all the standard stuff like removing node_modules, cleaning metro cache etc. I think it’s something with the new jsx transform feature. It works perfectly with classic build and in dev mode, but maybe EAS somehow not understand how to deal with it.

Btw everything works with the new expo run:android.

Build ID: 6d009733-316a-4d65-9ca4-74edff70bd69

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brentvatnecommented, Jul 12, 2021

yup

1reaction
chybisovcommented, Jul 3, 2021

@brentvatne this issue still present. I’ll try to make a reproducible example next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
Metro encountered an error: Unable to resolve module ./App from /Users/expo/workingdir/build/index.js: None of these files exist:.
Read more >
Module not found: Can't resolve 'react/jsx-runtime' | bobbyhadz
To solve the error Module not found: Error: Can't resolve 'react/jsx-runtime', make sure to update the `react` package by opening your terminal in...
Read more >
unable to resolve module react/jsx-runtime - Stack Overflow
Updating your react version possibily can resolve your problem. Command line: npm install --save react@latest.
Read more >
Troubleshooting build errors and crashes - Expo Documentation
This particular error means that the app is importing ./src/Routes and it is not found. The cause could be that the filename case...
Read more >
Can't use React-Bootstrap with Expo ( Unable to resolve ...
Coding example for the question Can't use React-Bootstrap with Expo ( Unable to resolve module react/jsx-runtime )-React Native.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found