Skip to content
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" #2468

Closed
crystalfp opened this issue Jan 10, 2021 · 1 comment
Closed

[BUG] When run script loglevel is ignored unless set to "silent" #2468

crystalfp opened this issue Jan 10, 2021 · 1 comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release

Comments

@crystalfp
Copy link

Current Behavior:

Running any script by npm shows a log of the script execution even if it is not an error. For example:
npm run my-script --loglevel error

> my_server@0.19.2 my-script D:\Project
> npx copyfiles --flat client/*.png server/http

The only way to silence the log message is by setting --loglevel silent
The same problem appears with npm@7
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@7 was not installing my application. Removing .npmrc revealed a version problem in my packages.

Expected Behavior:

If it is not an error, nothing should be added by npm, only the script messages should appear.

Steps To Reproduce:

  1. Create a project
  2. Edit package.json and change the start script to "node -e console.log(\"Hello\")"
  3. Run npm start It show the log
  4. Run npm start --loglevel error It show the log message
  5. Run npm start --loglevel silent No log message and the script output appears.'

Environment:

  • OS: Windows 10 64bits and Ubuntu latest
  • Node: 14.15.1 and 15.5.1
  • npm: 6.4.8 and 7.4.0
@crystalfp crystalfp added Bug thing that needs fixing Needs Triage needs review for next steps Release 6.x work is associated with a specific npm 6 release labels Jan 10, 2021
@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label Feb 13, 2021
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

2 participants