-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Priority 2secondary priority issuesecondary priority issuecmd:run-scriptrelated to `npm run-script`related to `npm run-script`config:displayIssues dealing with display of data to terminalIssues dealing with display of data to terminalsemver:majorbackwards-incompatible breaking changesbackwards-incompatible breaking changes
Description
Is there an existing issue for this?
- I have searched the existing issues
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
> [email protected] 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
n-peugnet, xcfw and cinderblock
Metadata
Metadata
Assignees
Labels
Priority 2secondary priority issuesecondary priority issuecmd:run-scriptrelated to `npm run-script`related to `npm run-script`config:displayIssues dealing with display of data to terminalIssues dealing with display of data to terminalsemver:majorbackwards-incompatible breaking changesbackwards-incompatible breaking changes