yarn start command failed with exit code 127

1.9k views Asked by At

Every time I try to start my project as usual using "yarn start" I get the "Command failed with exit code 127" error. I've realised I started to get this error once I've updated my iOS to Monterey v12.6.1 . My node version is not compatible with the yarn it seems like.

What have I tried to fix this:

  • I have tried to upgrade/update my node version.
  • I have uninstalled manually node/npm and yarn and reinstall them back with node version 16.0.0
  • I have deleted the node_modules and package_lock.json
  • I have had run the command "yarn" and every other update/upgrade command

Everything that I have tried failed.

This is the yarn error log:

Yarn version: 
  1.22.10

Node version: 
  15.7.0

Platform: 
  darwin x64

Trace: 
  Error: getaddrinfo ENOTFOUND registry.yarnpkg.com
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:69:26)

npm manifest: 
  {
    "name": "web",
    "version": "0.1.0",
    "homepage": "https://danibis.github.io/",
    "private": true,
    "dependencies": {
      "@testing-library/jest-dom": "^5.11.4",
      "@testing-library/react": "^11.1.0",
      "@testing-library/user-event": "^12.1.10",
      "cors": "^2.8.5",
      "express": "^4.17.2",
      "focus-trap-react": "^8.9.1",
      "leaflet": "^1.8.0",
      "node-sass": "^6.0.1",
      "nodemailer": "^6.7.2",
      "react": "^18.1.0",
      "react-dom": "^18.1.0",
      "react-leaflet": "^4.0.0",
      "react-scripts": "4.0.3",
      "styled-components": "^5.3.3",
      "web-vitals": "^1.0.1",
      "webpack-hot-middleware": "^2.25.1"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject",
      "predeploy": "yarn run build",
      "deploy": "gh-pages -d build"
    },
    "eslintConfig": {
      "extends": [
        "react-app",
        "react-app/jest"
      ]
    },
    "browserslist": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ]
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

Any other idea how to sort this out would be much appreciated.

Thank you for your time!

1

There are 1 answers

0
Daniel Bisceanu On

I’ve found the solution:

Use nvm to switch npm’s version to the newest ( 19.0.0 at that time ) and run “ yarn install “. This solved the issue!