Debugging output to a file from "npm install" via maven frontend plugin or command line options?

We use maven + frontend to run npm, node and ember to create an ember application. Sometimes this process hangs on "npm install" without any useful data in the log files. I would like to:

  • get a better idea by increasing the level of the magazine
  • avoid hiding other debug log data

In an ideal world, I would add command line options to

  • set the npm command log level for debugging
  • output to file

Then I would use the maven profile to ensure that the build system is always registered with max verbosity, while allowing developers to see important log information.

If you can specify command line parameters or file parameters or direct me to the relevant documents, I will gladly change my pom and publish it as a solution here.

thanks

Peter

+5
source share
1 answer

Have you tried these flags?

-dd, --verbose: -loglevel verbose

-ddd: --loolvel stupid

Regarding file registration, in accordance with https://docs.npmjs.com/misc/config#loglevel, any errors that occur will be logged in npm-debug.log

If you want to configure this, you can redirect stdout and stderr to a file

npm install -ddd &> filename.txt

+11
source

Source: https://habr.com/ru/post/1236638/


All Articles