I'm on Ubuntu 18.04, logged in as root. The group:owner of /root/.npm is root:root, recursively, and all permissions are 777, recursively. If I cd to the React folder:
cd /var/lib/jenkins/workspace/MedAverter/medaverter-front
And set all permissions of that folder to 777, recursively and then run
npm run build
I get error:
[[1;34mINFO[m] Running 'npm run build' in /var/lib/jenkins/workspace/MedAverter/medaverter-front [[1;34mINFO[m] [[1;34mINFO[m] > medaverter-front@0.1.0 build /var/lib/jenkins/workspace/MedAverter/medaverter-front [[1;34mINFO[m] > react-scripts build [[1;34mINFO[m] [[1;31mERROR[m] sh: 1: react-scripts: Permission denied [[1;31mERROR[m] npm ERR! code ELIFECYCLE [[1;31mERROR[m] npm ERR! errno 126 [[1;31mERROR[m] npm ERR! medaverter-front@0.1.0 build:
react-scripts build
[[1;31mERROR[m] npm ERR! Exit status 126 [[1;31mERROR[m] npm ERR! [[1;31mERROR[m] npm ERR! Failed at the medaverter-front@0.1.0 build script.
I've been googling for a solution for hours with no luck. It builds fine under Windows 10. Suggestions?