skip to Main Content

I keep getting this errror when i’m trying to run React native app from Xcode 13.3 .

if i run it from terminal ( react-native run-ios ) it works fine.

Please find enclosed error details.

>     > File /Users/Library/Developer/Xcode/DerivedData/appName-crvjvqqnpdxpwkfkxccvnxunhhkw/
Build/Products/Release-iphonesimulator/appName.app/main.jsbundle
> does not exist. This must be a bug with'
My Environment details

MAC OS - 12.3.1 (M1 chip)
Xcode - 13.3
command line tools - 13.3
RN version - 0.61.5

solutions i have tried upto now

npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

(Xcode) -Build Phases -> Bundle React Native code and images , change to

cd $PROJECT_DIR/..
export NODE_BINARY=node
./node_modules/react-native/scripts/react-native-xcode.sh

Please let me know how i can fix this error.

3

Answers


  1. This was resolve in 0.63.3. https://github.com/facebook/react-native/issues/29351

    If you still have issue with higher version, pls try to run react-native bundle command manually.

    Login or Signup to reply.
  2. Run

    sudo xcode-select --reset
    

    Then run

    npx react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle
    

    main.jsbundle should appear in your ios folder.

    Then add this file in xcode:

    enter image description here

    enter image description here

    Login or Signup to reply.
  3. I faced this issue when I updated node v18 from v16. Switching back to v16 fixed the error. React-native 0.62.2

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search