Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Local deps where the dep name and the name in the package.json differ don't result in an error #8588

Open
iarna opened this issue Jun 17, 2015 · 1 comment

Comments

@iarna
Copy link
Contributor

iarna commented Jun 17, 2015

So if in the main package.json:

{ "dependencies": { "foo": "../path/to/foo" } }

And in `../path/to/foo:
{ "name": "bar" }

This should result in an error. Instead, npm@2 happily installs it and npm@3 adds it to the ideal tree and then prunes it as it appears to be extraneous, so it never ends up installing it.

@iarna iarna added the bug label Jun 17, 2015
@iarna iarna added this to the multi-stage install milestone Jun 17, 2015
@piranna
Copy link

piranna commented Jun 17, 2015

For the record: on npm@2, it install it with "bar". It should throw an error because the name on the dependencies and the name of the package are not the same, or install it with the name defined on the dependencies instead (like an alias).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants