Step 4/9 : RUN yarn run build
---> Running in 09a2e8108274
yarn run v1.15.2
$ react-scripts build
/bin/sh: react-scripts: not found
error Command failed with exit code 127.
To solve this, I just added RUN npm install react-scripts -g --silent before the RUN yarn run build in the Dockerfile, and everything ran perfectly then on.
I had the same issue because I use don't use yarn. Solved by deleting node-modules, package-lock.json, and run the command yarn (this is similar to npm install). Then as he stated up above test the installation with yarn start.
For further actions, you may consider blocking this person and/or reporting abuse
Where hackers, sticks, weekend warriors, pros, architects and wannabes come together
Great article, just faced one problem:
To solve this, I just added
RUN npm install react-scripts -g --silentbefore theRUN yarn run buildin the Dockerfile, and everything ran perfectly then on.I had the same issue because I use don't use yarn. Solved by deleting node-modules, package-lock.json, and run the command yarn (this is similar to npm install). Then as he stated up above test the installation with yarn start.