[BUG] Why is npm
run writing into the .npm/_logs
directory or creating it?
#7032
Closed
2 tasks done
Labels
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm run
is creating if it does not exist and writing if it exists into the.npm/_logs
directory.Expected Behavior
Even if logs are turned off completely with the
--logs-max=0
option, the directory is still created. This calls for workarounds if the current directory is not writable (a relatively common scenario if you're working inside a container) or workarounds, but there is apparently no way to turn it off completely.Steps To Reproduce
This Dockerfile:
With this
package.json
When run with:
podman run --rm -it -v `pwd`:/app/test -u 1001 jjmerelo/dotnpm-test
It creates a
.npm
file with:So it still has an empty log directory.
Environment
npm@10.2.4
node@v21.2.0
The text was updated successfully, but these errors were encountered: