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 doesn't correctly resolve workspaces when defining a dependency using GitHub URLs #7554
I believe it's not suppose to work like that, whatever git repo url provided in package.json that will be considered the packages. Based on what I can understand from the write up is that you want npm to recognize that there is a workspace package in git repository and you want to map @org/dep-y of your package.json to internal folder/workspace of git repository package.
I couldn't find any reference of this behaviour in documentation, could you please provide link to it if you are referring in npm doc ?
As written at the beginning, if it's not a bug, then it's a limited behaviour in the functionality or the documentation.
The documentation explains how to link a package via GitHub, however if this package is inside a workspace, the documentation doesn't explain how I can do that. If I attempt to do it by following the documentation, an error is thrown.
@ematipico As you mentioned Documentation does explain how to use package if that package is GitHub repository, however if a package resides inside a folder/directory within a repository, this behaviour is not supported as far as i know. You can only directly use GitHub repository as mentioned in the documentation.
@milaninfy I understand and know that; however, you didn't tell me how to resolve this issue. Is the documentation outdated? Is it a bug in the package's resolution when using a git repository? Is it missing functionality that requires an RFC?
Assigning P1 for now, We may need to check few things, However it might not be inline with this bug report but a different bug related to workspaces and git.
Activity
RobertAKARobin commentedon Jul 29, 2024
I am also experiencing this on npm 10.8.2.
milaninfy commentedon Aug 2, 2024
I believe it's not suppose to work like that, whatever git repo url provided in package.json that will be considered the packages. Based on what I can understand from the write up is that you want npm to recognize that there is a workspace package in git repository and you want to map
@org/dep-yof your package.json to internal folder/workspace of git repository package.I couldn't find any reference of this behaviour in documentation, could you please provide link to it if you are referring in npm doc ?
ematipico commentedon Aug 2, 2024
As written at the beginning, if it's not a bug, then it's a limited behaviour in the functionality or the documentation.
The documentation explains how to link a package via GitHub, however if this package is inside a workspace, the documentation doesn't explain how I can do that. If I attempt to do it by following the documentation, an error is thrown.
milaninfy commentedon Aug 9, 2024
@ematipico As you mentioned Documentation does explain how to use package if that package is GitHub repository, however if a package resides inside a folder/directory within a repository, this behaviour is not supported as far as i know. You can only directly use GitHub repository as mentioned in the documentation.
ematipico commentedon Aug 9, 2024
@milaninfy I understand and know that; however, you didn't tell me how to resolve this issue. Is the documentation outdated? Is it a bug in the package's resolution when using a git repository? Is it missing functionality that requires an RFC?
milaninfy commentedon Aug 9, 2024
Assigning P1 for now, We may need to check few things, However it might not be inline with this bug report but a different bug related to workspaces and git.
reggi commentedon Sep 16, 2024
I added to the docs that this is just a limitation of using git packages directly here in this npm/documentation#1279 available here https://docs.npmjs.com/about-packages-and-modules
Fix issues #440, #439, #258: git-install docs, llms.txt links, env ho…