[BUG] npm produces "timing" log output when "npm start"
Is there an existing issue for this?
- [X] I have searched the existing issues
This issue exists in the latest npm version
- [X] I am using the latest npm
Current Behavior
' npm start ' produces the following timing output which sticks always to the last line:
the "normal" output from the started app is always scrolling above this last line.
Expected Behavior
no timing output.
Digging deeper I noticed that with --loglevel silentor error there is no sticky output.
BUT for warn , notice and http there is timing output which in my opinion should not happen, since these levels are before timing log level ....
Steps To Reproduce
- npm start
- See error...
Environment
- npm: 8.5.3
- Node.js: 17.6.0
- OS Name: macOS 12.2.1
- System Model Name: Macbook Pro
- npm config:
npm config ls
npm WARN ignoring workspace config at /Users/ogi/Repositories/IMS/IMS_v2/packages/mims-test/.npmrc
npm WARN config This command does not support workspaces.
; "user" config from /Users/ogi/.npmrc
; @ogi-it:registry = "http://localhost:4873/" ; overridden by project
//localhost:4873/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
scripts-prepend-node-path = true
; "project" config from /Users/ogi/Repositories/IMS/IMS_v2/.npmrc
@ogi-it:registry = "http://localhost:4873"
; node bin location = /usr/local/bin/node
; cwd = /Users/ogi/Repositories/IMS/IMS_v2/packages/mims-test
; HOME = /Users/ogi
; Run `npm config ls -l` to show all defaults.
ogi@ogi-it-mac mims-test %
I noticed something similar and I observed that the timing information is only printed if there is some warning output happening before.
In your case:
npm WARN ignoring workspace config at /Users/ogi/Repositories/IMS/IMS_v2/packages/mims-test/.npmrc
I think if you are using npm workspaces, you only need an .npmrc at the workspace root.
@ansf you are totally right! That is indeed the cause of the timing info. Thank you! Ognian
@ansf you are totally right! That is indeed the cause of the timing info. Thank you! Ognian
@Ognian how is an otherwise harmless warning the "cause" of a useless flickering progress bar, destroying my terminal output? Is there a workaround for existing npm installations?
@webhype As far as I can see the underlying problem was solved with the 8.x version. In my case removing .npmrc files in all subdirectories stopped the output from appearing with the 7.x version of npm.
What is the fix version for this bug?
I have it on npm version 8.19.2.
To remove the annoying thing I set:
npm config set progress=false
What is the fix version for this bug?
@synox this was fixed in 9.0.0. technically it was fixed in one of the v9 prereleases, but 9.0.0 is the first stable version with the fix.