fypnlp
fypnlp

Reputation: 1547

build failed: exit code 127

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:

enter image description here

Questions:

  1. What did I do wrong
  2. How do I fix it?

Upvotes: 7

Views: 88493

Answers (6)

Tinucy
Tinucy

Reputation: 11

I had this same issue. I removed my package.json file and re-run yarn. It worked for me

Upvotes: 1

Deepak Agarwal
Deepak Agarwal

Reputation: 21

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.

Please check this netlify application image

Upvotes: 2

Daniel Danielecki
Daniel Danielecki

Reputation: 10572

For those coming with yarn 127 error code problem

Take a look on https://github.com/reactstrap/reactstrap/issues/711 Most probably you just need to run in console yarn :)

Upvotes: 9

champion-runner
champion-runner

Reputation: 1647

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.

Upvotes: 2

vijayan007
vijayan007

Reputation: 386

Try below commands it works for me

  • $ npm install @ionic/app-scripts@latest --save-dev

  • $ ionic serve

Upvotes: 2

Michael Abeln
Michael Abeln

Reputation: 2587

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"
},

Upvotes: 1

Related Questions