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 view ${tag} version got stuck when ran from workspace directory #3790

Closed
1 task done
Donorlin opened this issue Sep 24, 2021 · 1 comment · Fixed by #4576
Closed
1 task done

[BUG] npm view ${tag} version got stuck when ran from workspace directory #3790

Donorlin opened this issue Sep 24, 2021 · 1 comment · Fixed by #4576
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@Donorlin
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi, I have a simple monorepo project with workspaces. Root pkg.json contains

  "workspaces": [
    "packages/*",
  ],

Command npm view ${tag} version (tag is any package/* and is published and exists in the registry) ran in the command line from root returns version as expected.

But, running this command from the directory of any package gets stuck and returns nothing (the process is stuck).

Expected Behavior

npm view ${tag} version command should behave the same no matter where ran.

Steps To Reproduce

  1. Have monorepo with workspaces
  2. Have published monorepo packages (at least the one you will try to "view")
  3. Run npm view ${tag} version from the directory of one of the packages, where $tag is one of the published packages
  4. process will get stuck

Environment

  • OS: Win 10
  • Node: v14.17.3
  • npm: 7.23.0
@Donorlin Donorlin added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Sep 24, 2021
@wraithgar
Copy link
Member

There are two things happening here. First, if you do something like npm view npm/cli it will try to view the github package at https://github.com/npm/cli. Two strings joined by a slash is shorthand for a github url. The fact that it's hanging on your machine would indicate that git itself is hanging for one reason or another.

Second, there does appear to be a bug trying to npm view ./path. A pr fixing this is in the works.

@wraithgar wraithgar added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Mar 16, 2022
@nlf nlf closed this as completed in #4576 Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants