"react": "16.13.1", "react-native": "0.63.0",
Encountered the below main.jsbundle does not exist. This must be a bug with issue when trying to archive after upgrading to react-native 0.63. was wondering if anyone encounters the same issue
This worked for me in a project involving babel-plugin-module-resolver
:
ios/*.xcworkspace
in Xcode.cd $PROJECT_DIR/..
to go up a directory.The whole script should look like this:
cd $PROJECT_DIR/..
export NODE_BINARY=node
./node_modules/react-native/scripts/react-native-xcode.sh
Note that this might break if the source of this is a bug in 0.63.0, so you may need to undo this on a future release.
Props to @typester for bringing this up on facebook/react-native #29351.
Found a solution
main.jsbundle
package.json
, add"scripts": {
"bundle:ios": "react-native bundle --entry-file index.ios.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios",
"postinstall": "yarn run bundle:ios"
...
},
so the main.jsbundle
will be generated
For me the error occurred because I had imports like this:
import Component from '..';
Replacing those with relative paths (@components/path/to/component
) fixed the issue.
Not sure why resolving these paths is problematic now.
I dug into the node_modules/react-native/node_modules/@react-native-community/cli/build/commands/bundle/buildBundle.js
and placed a catch block in the buildBundle
function in order to see the component(s) with the problematic import.
I think @changey's solution also works, it only requires adding an additional build step in the CI.
None of the above fixed it for me, but it works with this PR, it'll probably be released soon https://github.com/facebook/react-native/pull/29477
Just in case somebody finds it useful :)
Change your babel.config.js to .babelrc.js and it will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With