app/main.jsbundle does not exist error when making archive in apple-m1 and xcode13

Viewed 53

I am keep getting this error when generating an archive

however build in simulator is working fine

getting beloe error

Showing Recent Messages File /Users/simranjeet/Library/Developer/Xcode/DerivedData/ShhParty-csbogbjoovolurdbnvnwtayywufy/Build/Intermediates.noindex/ArchiveIntermediates/ShhParty/BuildProductsPath/Release-iphoneos/ShhParty.app/main.jsbundle does not exist. This must be a bug with

please help

Thanks

1 Answers

@Simranjeet Which version of node are you using? if you are using node v18.8.0. You are likely to get into this problem.

SOLUTION:1 Adding export NODE_OPTIONS=--openssl-legacy-provider to Bundle React Native code and images. Note it should be above export NODE_BINARY=/usr/local/bin/node

SOLUTION:2 I suggest you use node V.16 You can use nvm to install it.

Related