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] npm produces "timing" log output when "npm start" #4527

Closed
2 tasks done
Tracked by #546
Ognian opened this issue Mar 9, 2022 · 7 comments · Fixed by #5717
Closed
2 tasks done
Tracked by #546

[BUG] npm produces "timing" log output when "npm start" #4527

Ognian opened this issue Mar 9, 2022 · 7 comments · Fixed by #5717
Labels
Bug thing that needs fixing config:display Issues dealing with display of data to terminal Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release

Comments

@Ognian
Copy link

Ognian commented Mar 9, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

' npm start ' produces the following timing output which sticks always to the last line:
image
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

  1. npm start
  2. 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 % 
@Ognian Ognian added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Mar 9, 2022
@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Mar 14, 2022
@ansf
Copy link

ansf commented Mar 23, 2022

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.

@Ognian
Copy link
Author

Ognian commented Mar 24, 2022

@ansf you are totally right! That is indeed the cause of the timing info.
Thank you!
Ognian

@lukekarrys lukekarrys self-assigned this Apr 6, 2022
@lukekarrys lukekarrys added Priority 1 high priority issue and removed Priority 2 secondary priority issue labels Apr 12, 2022
@lukekarrys lukekarrys removed their assignment Jul 11, 2022
@lukekarrys lukekarrys added the config:display Issues dealing with display of data to terminal label Jul 14, 2022
lukekarrys added a commit to npm/npmlog that referenced this issue Oct 19, 2022
lukekarrys added a commit to npm/npmlog that referenced this issue Oct 19, 2022
lukekarrys added a commit that referenced this issue Oct 19, 2022
Previously, `npmlog` was attempting to enable the progress bar even when
logs were paused. This displayed the most recent log (most often an
error) for the rest of the process.

Fixes #4527
lukekarrys added a commit that referenced this issue Oct 19, 2022
Previously, `npmlog` was attempting to enable the progress bar even when
logs were paused. This displayed the most recent log (most often an
error) for the rest of the process.

Fixes #4527
lukekarrys added a commit that referenced this issue Oct 19, 2022
Previously, `npmlog` was attempting to enable the progress bar even when
logs were paused. This displayed the most recent log (most often an
error) for the rest of the process.

Fixes #4527
@webhype
Copy link

webhype commented Oct 23, 2022

@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?

@Ognian
Copy link
Author

Ognian commented Oct 24, 2022

@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.

@synox
Copy link

synox commented Jan 5, 2023

What is the fix version for this bug?

@alehro
Copy link

alehro commented Jan 16, 2023

I have it on npm version 8.19.2.
To remove the annoying thing I set:
npm config set progress=false

@lukekarrys
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing config:display Issues dealing with display of data to terminal Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants