Generating and locating npm-debug.log files
When a package fails to install or publish, the npm CLI will generate annpm-debug.log
file. This log file can help you figure out what went wrong.
If you need to generate anpm-debug.log
file, you can run one of these commands.
For installing packages:
npm install --timing
For publishing packages:
npm publish --timing
You can find thenpm-debug.log
file in your.npm
directory. To find your.npm
directory, usenpm config get cache
.
If you use a CI environment, your logs are likely located elsewhere. For example, in Travis CI, you can find them in the/home/travis/build
directory.