I'm using npm to install some internally developed packages on a Ubuntu 14.04 server. During install, a folder is created under /tmp. According to the docs, the temporary folder should be deleted on successful exit, but it isn't happening. I've checked the exit code, and it's zero as expected, so what else could be causing this? It's clogging up my build server, which currently has quite limited disk space available - I can work round this by using a cronjob to clean up, or by adding more disk space, but I want to know the cause!
Running npm v 1.4.28.
Update: This only happens when the package you are installing has been shrinkwrapped using the npm shrinkwrap
command. Confirmed as a problem in npm v 1.4.28 and 2.1.10. See the issue on GitHub.
Edit: I've also run the install in verbose mode, it ends with
npm verb exit [ 0, true ]
npm info ok
There's lots of mention of /tmp in the output in terms of writing to it, and untarring things there, but no obvious attempt to clean it up.