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:
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 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
- Create a directory with a project in it
- Edit package.json and add script
"start": "node -e console.log('Hello')"
- Run
npm start. It shows the log
- Run
npm start --loglevel error. It show the log message, but it should not, it is not an error
- Run
npm start --loglevel silent. No log message.
Environment
- OS: Windows 10 64bits
- Node: 16.2.0
- npm: 7.15.1
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 silentThe 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