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] Aliases of NPM packages are broken when used in dependencies #4197
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 that package.json.
Environment
npm: 8.3.0
Node: 17.3.0
OS: macOS 12.1
platform: arm64
npm config:
; "user" config from /Users/fabio/.npmrc
//registry.npmjs.org/:_authToken = (protected)
init.author.email = "[email protected]"init.author.name = "Fabio Spampinato"package-lock = false
script-shell = "zsh"; node bin location = /Users/fabio/.nvm/versions/node/v16.13.0/bin/node; cwd = /Users/fabio/Desktop/asd; HOME = /Users/fabio; Run `npm config ls -l` to show all defaults.
hi @fabiospampinato thanks for reporting this issue, just to be sure, the problem here is that npm ls is reporting the wrong package name (not following the alias) ? Everything else works fine in the installation?
Activity
fabiospampinato commentedon Dec 28, 2021
I just checked that it reproduces on latest under Node v17 too.
ruyadorno commentedon Jan 27, 2022
hi @fabiospampinato thanks for reporting this issue, just to be sure, the problem here is that
npm lsis reporting the wrong package name (not following the alias) ? Everything else works fine in the installation?fabiospampinato commentedon Jan 27, 2022
No, npm installed the wrong package. You can check manually what got installed.
regseb commentedon Oct 30, 2024
I have the same problem #7884, but only if the version numbers of the two dependencies are identical.
playwrightuses"1.48.2"rebrowser-playwrightuses"npm:rebrowser-playwright-core@~1.48.2"{ "name": "testcase", "version": "1.0.0", "dependencies": { "playwright": "1.48.2", "rebrowser-playwright": "1.48.2" } }With different versions, packages are not deduplicated:
{ "name": "testcase", "version": "1.0.0", "dependencies": { "playwright": "1.48.1", "rebrowser-playwright": "1.48.2" } }