build failed: exit code 127
Solution 1
Try this, and please take care of the spaces.
It worked for me though. I added CI= in the capital before npm run build
. Double-check if you did git add. , git commit -m "first commit"
and git push -u origin
before your final deployment.
Solution 2
Replace your scripts
values with these, and try again:
"scripts": {
"ios": "react-native run-ios",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"test:e2e":"npm run test",
"test:e2e:build":"npm run build" // THIS SCRIPT WILL STILL BREAK FOR YOU
},
The last two are the important ones!
You need to prefix a script command with npm run
or yarn
if the script references another script in your package.json
.
So instead of a script calling navicotrackapp test
it would call npm run test
OR yarn test
.
NOTE:
In you example it looks like the terminal is failing on the script navicotrackapp build
. Know that you do not have a build
script defined so if you replace the script with npm run build
it will still fail. You'll need to add a build
script in if you want it to work!
"scripts": {
"ios": "react-native run-ios",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"build": // DO SOMETHING HERE!!!!,
"test:e2e":"npm run test",
"test:e2e:build":"npm run build"
},
Solution 3
Try below commands it works for me
$ npm install @ionic/[email protected] --save-dev
$ ionic serve
Solution 4
Just use https://app.netlify.com/drop to deploy manually on Netlify
first run this command
npm run build
OR
yarn run build
Then drag and drop the build folder on the website above.
Related videos on Youtube

fypnlp
Updated on July 05, 2022Comments
-
fypnlp 11 months
created my project with my app
This is the project.json file. That I have created
{ "name": "detox", "version": "0.0.1", "private": true, "scripts": { "ios": "react-native run-ios", "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest", "test:e2e":"navicotrackapp test", "test:e2e:build":"navicotrackapp build" }, "dependencies": { "react": "16.6.1", "react-native": "0.57.7" }, "devDependencies": { "babel-jest": "23.6.0", "jest": "23.6.0", "metro-react-native-babel-preset": "0.49.2", "react-test-renderer": "16.6.1" }, "jest": { "preset": "react-native" }, "detox": { "configurations": { "ios.sim.debug": { "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/navicotrackapp.app", "build": "xcodebuild -project ios/navicotrackapp.xcodeproj -scheme navicotrackapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "type": "ios.simulator", "name": "iPhone XR" } } } }
However. When I ran the test this was the out come:
Questions:
- What did I do wrong
- How do I fix it?
-
fypnlp over 4 yearsThanks man. I'm totally new to react native with ios. You're a legend.