Hi, we would like to use the new
npm ci command in our Jenkins build but we cannot delete the
I found a description of the issue we encounter in the following archived Github issue : https://github.com/npm/npm/issues/20104.
We have an other use case where the whole deletion of the
node_modules directory is problematic.
To speed-up our
npm install executions in Jenkins we map a
tmpfs Docker volume to the
Our configuration is similar to the following (Jenkins starts a Docker container and then
npm ci is executed inside it) :
docker run -t -d -u 500:500 --tmpfs=/project_directory/node_modules:exec,gid=500,uid=500 -v /home/ec2-user/efs/.npm:/.npm ... node:11
With this mapping our
npm install commands are very very fast because all file copies are done completely in memory.
But because the
tmpfs volume is created at container start it cannot be deleted by
npm ci after.
To solve our problem it would require one of the following
- Prevent the
node_modulesto be deleted
node_module/**/*files instead of delete the
What do you think about that ?