error Command failed with exit code 127
The issue
When we started react.js beased front-end for our application we got into the following issue:
error Command failed with exit code 127.
Reason of the issue
We were using a react.js boilerplate as our base. On the boilerplate, the project build was done by yarn (a JavaScript dependency manager). After the git clone when we run the command like yarn start
, we got the following error:
error Command failed with exit code 127.
The reason was, we didn’t install all the required dependency first
The solution
We had to install all the dependencies first. We had to run the command yarn
before we start the project.
$ yarn or $ yarn install
If you are using NPM as your package manager then you can run the following command to install dependencies:
$ npm install
In case if you face the issue even after running yarn install, you can get rid of the node_modules folder entirely. Then install the dependencies.
$ rm -rf node_modules $ yarn install