[BUG] <title> #3743
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 7.x
work is associated with a specific npm 7 release
Is there an existing issue for this?
Current Behavior
Issue #2035 was closed with an example of how to install own projects
a
andb
and make 'a' depend upon 'b'.That doesn't work (anymore?). The reason is that
b
already exists on npm, but despite that the installation half-works, and reason for failure is not clearly informed through error message. (E.g., Project 'a' also exists on npm, and that does NOT cause an error.)Expected Behavior
If project 'x' can be initialized in a workspace, then thereafter that name should take precedence over an npm package with same name, when used in the workspace context.
Notice the described expected behavior includes the possibility of refusing to initialize a project because the name is already in the npm namespace. However it think it would be better to allow the any name for local use, and worry about naming collision later, when it comes time to publish to npm.
Why?
Supposing npm does not want to let workspace names have precendece over npm package names. Then using file names (specifically the file name of the target package) should be possible as a workaround. Currently it seems not possible, as shown in the note test behaviour described below.
Steps To Reproduce
Here's what I get when I run the #2035 a/b example
then
Huh? I'll fix that:
So it works!? I could almost let that slip by.
Package
b
has already been a package on npm for 8 years.If I start again and the try to install
b
as a folderLog file:
This also fails
Not being able to use already used package names should not be called a bug - I guess - but not giving an error message 'name taken' can be very confusing.
Not being able to install as a file? Is that a bug, a limitation, or a design choice feature?
Environment
The text was updated successfully, but these errors were encountered: