force npm to save a npm-debug.log (even on success)


(Kevin Turner) #1

How do I get an npm-debug.log if npm did not exit with an error?

I know we’ve done this before, something that always makes it fail at the end, but I don’t remember what that was.


(Kat Marchán) #2

npm install --timing

It’s hacky, and it’ll log as if there was an error, but you’ll get the debug log. :sparkles:


(Joshua Chaitin Pollak) #3

The debug log only seems to be emitted once npm successfully completes running. What should we do if it seems to get stuck without ever terminating?


(Joshua) #4

npm <your command> -ddd 2> npm-debug.log should work