Most likely memory is a problem, you can try setting env variable NODE_OPTIONS=--max-old-space-size=700. Try experimenting with that value, it is in MB and it needs to be lower than the total amount, but if it is to low it will kill a js process if it allocates more than that amount.
it happens with expo init full blank project too. Basically, I cannot press Ctr+C to break the process, since the CPU is dying. Same happens on a different fresh new Ubuntu server…
in general this isn’t something we have too much control over at the moment because we use react-native’s default bundler, metro. you may be able to find more information and possible workarounds on http://github.com/facebook/metro
Also, I’ve discovered another issue on multiple linux machines, maybe that could lead to the source of the my Ubuntu problem.
I’ve added some standard option for “babel-preset-expo”, but seems that the preset script works different on linux platforms.
Reproduce with new blank project:
expo init, then adding any documented options to babel.config.js ['babel-preset-expo', { jsxRuntime: 'classic' }]
Note: Works perfectly on OSX, Windows, but gives the following error on linux:
index.js: Unknown option: .jsxRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.
- Maybe you meant to use
"presets": [
["babel-preset-expo", {
"jsxRuntime": "classic"
}]
]
To be a valid preset, its name and options should be wrapped in a pair of brackets