Output debug to file from 'npm install' via maven frontend plugin or via commandline options?
Have you tried these flags?
-dd, --verbose: --loglevel verbose
-ddd: --loglevel silly
As far as logging to a file, according to https://docs.npmjs.com/misc/config#loglevel any errors that occur will be logged to npm-debug.log
If you want to adjust that, you can redirect stdout and stderr to a file
npm install -ddd &> filename.txt
Related videos on Youtube
Peter Kahn
Release engineer who actually enjoys release engineering. Trying to get the right information to the right people in the right way so they can do their jobs better. Presently happily employed with the excellent ZWS team at Zscaler. The team is rock solid, the product a rocket ship. We are hiring, and I'm not looking to get off this ride.
Updated on June 07, 2022Comments
-
Peter Kahn almost 2 years
We use maven + frontend to execute npm, node and ember to create an ember app. Sometimes this process hangs on 'npm install' with no useful data in log files. I'd like to:
- get better insight by increasing log level
- avoid obscuring other log info with debug messages
In a perfect world, I'd add command line options to
- set npm commands log level to debug
- output to a file
Then, I'd use a maven profile for ensure the build system always logs with max verbosity while still allowing developers to see important log info.
If you can tell me the command line options or file settings or direct me to the relevant docs then I'll happily modify my pom and post that as a solution here.
Thanks
Peter