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 issueI have a problem with eas build, it gives me this error.
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:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yup
@brentvatne this issue still present. I’ll try to make a reproducible example next week.