You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm view ${tag} version got stuck when ran from workspace directory #3790
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
Have monorepo with workspaces
Have published monorepo packages (at least the one you will try to "view")
Run npm view ${tag} version from the directory of one of the packages, where $tag is one of the published packages
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.
Activity
wraithgar commentedon Mar 16, 2022
There are two things happening here. First, if you do something like
npm view npm/cliit will try to view the github package athttps://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.