Federico De Marines
Federico De Marines

Reputation: 81

Travis error on react-native IOS release scheme

When i build ios release scheme locally i get no errors, but when i build on travis the release scheme i get this error under Running script 'Bundle React Native code and images':

File /Users/travis/Library/Developer/Xcode/DerivedData/TestApp-bktrthrvpvtbhdcrrzrzfekixdcy/Build/Products/Release-iphonesimulator/TestApp.app/main.jsbundle does not exist. This must be a bug with

I checked that when i run it locally the main.jsbundle is copied inside this folder but on travis this file is not copied although before building i run: react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle This is my .travis.yml configuration:

- language: objective-c sudo: required xcode_project: ios/TestApp.xcworkspace xcode_scheme: ios/Release node_js: false env: - TEST='IOS RELEASE BUILD' before_install: - nvm install 9.10.0 install: - brew install yarn - yarn install - npm install -g react-native-cli script: - react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle - cd ios - xcodebuild -workspace TestApp.xcworkspace -scheme Release -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c; exit ${PIPESTATUS[0]}

I am using react-native v0.56

Upvotes: 0

Views: 352

Answers (1)

Federico De Marines
Federico De Marines

Reputation: 81

Finally, after searching i solved it by adding this line to my travis.yml

nvm alias default v9.10.0

after nvm install 9.10.0

Apparently, the script was using an other version of node and by setting this I forced it to use this node version

Upvotes: 1

Related Questions