-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] When run script loglevel is ignored unless set to "silent" #3354
Comments
hi @crystalfp thanks for taking the time to reporting this, there are a few other loglevel/output issues that this makes me think of that we were currently tackling:
From my point of view it seems to me that tweaking @lukekarrys I'd love to hear your thoughts on it, I know you've been handling the overall output clean up so this one is a very good one to keep in mind. |
Well, I got into the habit of using always the |
In bcc781a, this output was moved from stdout to stderr when in I think this should probably be what happens all the time, but that would be a breaking change. I documented the new behavior with a comment in the code indicating this should be changed in the future. I think these should probably be log messages with a level of Lines 321 to 326 in b54cdb8
|
I'm going to close this since we wont be tracking it as a bug. Instead it's on the v11 roadmap issue since changing it would be a breaking change npm/statusboard#488 |
Is there an existing issue for this?
Current Behavior
Running any script by npm shows a log of the script execution even if it is not an error. For example:
The only way to silence the log message is by setting
--loglevel silent
The problem is that setting loglevel in .npmrc silences also valid messages from npm. I had to spent too much time to debug why npm was not installing my application. Removing .npmrc revealed a version problem in my packages.
BTW this issue is a re-submission for npm@7 of #2468 for npm@6
Expected Behavior
If it is not an error, nothing should be shown by npm, only the script messages should appear.
Steps To Reproduce
"start": "node -e console.log('Hello')"
npm start
. It shows the lognpm start --loglevel error
. It show the log message, but it should not, it is not an errornpm start --loglevel silent
. No log message.Environment
The text was updated successfully, but these errors were encountered: