[React] react-scripts: Permission denied during build
A short troubleshooting note about executable permissions after moving a React project to another computer.
October 1, 2023
Running npm run build on a React project copied from another computer produced this error:
test_app@0.1.0 build
react-scripts build
sh: ../node_modules/.bin/react-scripts: Permission denied
The message meant that the react-scripts file did not have permission to execute. At the time, I added that permission and continued the build.
sudo chmod +x node_modules/.bin/react-scripts
I then confirmed that the build ran successfully.
Original post: View source