artefactual-labs / am

Development environment for Archivematica
https://archivematica.org
GNU Affero General Public License v3.0
10 stars 20 forks source link

Problem: dashboard container build fails - webpack: Permission denied #98

Closed tw4l closed 3 years ago

tw4l commented 3 years ago

docker-compose up -d --build fails while building the archivematica-dashboard container at this step:

Step 23/30 : RUN chown -R archivematica:archivematica /src/dashboard/frontend   && su -l archivematica -c "cd /src/dashboard/frontend && npm install"
 ---> Running in 3935e03c7560

> dashboard@0.0.0 prepare /src/dashboard/frontend
> webpack --progress --colors --entry ./app.js

sh: 1: webpack: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! dashboard@0.0.0 prepare: `webpack --progress --colors --entry ./app.js`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the dashboard@0.0.0 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/archivematica/.npm/_logs/2020-12-14T17_24_13_033Z-debug.log
ERROR: Service 'archivematica-dashboard' failed to build: The command '/bin/sh -c chown -R archivematica:archivematica /src/dashboard/frontend  && su -l archivematica -c "cd /src/dashboard/frontend && npm install"' returned a non-zero code: 126

I'm on Ubuntu 20.04, docker-compose version 1.27.4. This was previously working for me in Ubuntu 18.04 but I had a messy upgrade and had to reinstall a lot of things, so it could very well be a systems issue on my end.

tw4l commented 3 years ago

I think this was related to my broken Ubuntu upgrade and backup restore process. Starting from a fresh copy of the am repo, I'm not having the same issue.