Fails to build when using react-native bundler
See original GitHub issueHi!
I’ve be trying to use lingui within a react-native project but I have an issue using the lingui-react
babel. Running react-native start
will fail with the following error, which is not really helping:
error: bundling failed: TypeError: /Users/arnaud/projects/slite/mobile/node_modules/lingui-react/dist/index.js: undefined is not iterable!
at module.exports.require.getIterator (/Users/arnaud/projects/slite/mobile/node_modules/core-js/library/modules/core.get-iterator.js:5:42)
at processMethod (/Users/arnaud/projects/slite/mobile/node_modules/babel-plugin-lingui-transform-js/dist/index.js:53:30)
I think I don’t have any error in my setup, which is dead simple:
Relevant deps:
"react-native": "0.50.3",
"lingui-i18n": "^1.3.2",
"lingui-react": "^1.3.4",
"babel-preset-lingui-react": "^1.0.9",
"babel-preset-react-native": "4.0.0",
Lingui config:
{
"fallbackLocale": "en",
"sourceLocale": "en",
"localeDir": "<rootDir>/src/locale",
"srcPathDirs": [
"<rootDir>/src"
],
"srcPathIgnorePatterns": [
"/node_modules/"
],
"format": "lingui"
}
.babelrc:
{
"presets": [
"react-native",
"lingui-react"
]
}
File structure:
The build works fine when I remove lingui-react
from .babelrc
but then I get the fair warning:
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
React native app failed to build while trying to bundle release
try this,. Close metro server if is opend watchman shutdown-server; for delete node-modules and re install and clear-cache watchman ...
Read more >npx react-native init project failure while installing Bundler ...
Hello, I am trying to initialize a new project by following the steps in Setting Up the Development Environment. I get an error...
Read more >Troubleshooting - React Native
Using a port other than 8081 ... You will also need to update your applications to load the JavaScript bundle from the new...
Read more >Error Boundaries - React
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI...
Read more >Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. ... a native iOS build, it means Metro bundler failed to...
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 FreeTop 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
Top GitHub Comments
Hi, I’m off until Wednesday. I’ll let you know once I’m back online 👍
Great, thank you! 👍 Getting exposure is hard, but people are starting using it, talking about it and writing blog posts, so it should get better 😃
If you wish I could mention your project/company in README to get a bit of social proof