-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Aliases of NPM packages are broken when used in dependencies #4197
Comments
I just checked that it reproduces on latest under Node v17 too. |
hi @fabiospampinato thanks for reporting this issue, just to be sure, the problem here is that |
No, npm installed the wrong package. You can check manually what got installed. |
I have the same problem #7884, but only if the version numbers of the two dependencies are identical.
{
"name": "testcase",
"version": "1.0.0",
"dependencies": {
"playwright": "1.48.2",
"rebrowser-playwright": "1.48.2"
}
} $ npm list --all
testcase@1.0.0 /home/regseb/testcase
├─┬ playwright@1.48.2
│ └── playwright-core@1.48.2
└─┬ rebrowser-playwright@1.48.2
└── playwright-core@1.48.2 deduped 👎 With different versions, packages are not deduplicated: {
"name": "testcase",
"version": "1.0.0",
"dependencies": {
"playwright": "1.48.1",
"rebrowser-playwright": "1.48.2"
}
} $ npm list --all
testcase@1.0.0 /home/regseb/testcase
├─┬ playwright@1.48.1
│ └── playwright-core@1.48.1
└─┬ rebrowser-playwright@1.48.2
└── playwright-core@npm:rebrowser-playwright-core@1.48.2 👍 |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Dependencies in the following
package.json
file are not resolved correctly:This is installed:
Expected Behavior
Notice how the wrong
once
module got installed forpikchr-wasm
, it's dependency tree should look like this:I guess the problem is that NPM got confused since I'm using an alias for a module, and that alias is the name of another module that the parent package needs.
Steps To Reproduce
Run
npm i
on thatpackage.json
.Environment
The text was updated successfully, but these errors were encountered: