I run my testing script with npm run test
and added {script: {test: "jasmine"}}
to the package.json
. My problem that every time I run the test, npm generates an npm-debug.log
file, which I don't need. Is there a way to turn off this feature?
note:
I will use npm run
only by running the tests on http://travis-ci.org/ if it is not possible to turn off this feature, will it generate a log file on the travis server by testing the build, or what?
news 2016:
There are news in the topic. At least after 5 years npm debug log was moved to the cache folder: https://github.com/npm/npm/issues/1548 , so it no longer pollutes our project folders.
Sort of good news, eveyone! You can suppress them by setting a command line parameter -loglevel silent
, like npm install sfdfsdf -loglevel silent
. However, this will also turn off feedback in the console, so I wouldn't do that.
I recommend ignoring them in your .gitignore
file, so that they aren't officially in your project. Then, I just pretend they aren't there bothering my obsessive mind. =D
npm config docs. GitHub discussion about this issue.
In addition to m59's answer, you could modify your npm run test
to include && rm npm-debug.log
. This will automatically delete the log after the test is finished, basically never letting you see it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With