Thanks for providing more info. Looks like this is definitely a permissions issue with Docker on Windows. I’m not exactly sure how to solve the issue, and don’t have a windows machine to test it, so this might take a little while to solve!
In the logs you provided, we can see the we run into the issue when running the command
npm run prepublishOnly which will call this cleanup script.
The error is not thrown when trying to delete the folders but rather internally in some NPM process trying to do something with logs:
permission denied, scandir '/root/.npm/_logs'
My first suggestion would be to change line 47 in the Dockerfile to read instead:
RUN npm install --no-audit
That way the command
npm install will be run with the
node user (provided by the official node docker image that we are based on), which could solve the issue.
After that please try running
docker-compose build again and see if you have better luck
You can also try with
USER root instead, which we wouldn’t want to do for production use but is fine for local development.
Let me know if any of this helps !