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

Fallback to install <name> when install <tarball file> failed #7703

Closed
XeCycle opened this issue Mar 22, 2015 · 4 comments
Closed

Fallback to install <name> when install <tarball file> failed #7703

XeCycle opened this issue Mar 22, 2015 · 4 comments

Comments

@XeCycle
Copy link

XeCycle commented Mar 22, 2015

npm install module-name-on-npmjs-registry will fail if a file with the same name exists in cwd, but is not a valid module tarball. E.g.:

mkdir temp
cd temp
touch lodash
npm i lodash

--- fail.

@kenany
Copy link
Contributor

kenany commented Mar 22, 2015

@XeCycle So you think npm should first assume registry?

@XeCycle
Copy link
Author

XeCycle commented Mar 22, 2015

@kenany Yes, that covers more cases. To force installing a local tarball one can say install ./tarball-file-name, if that name exists in the registry, but the reverse is difficult; using user/name may also fail if user/name exists in cwd.

@iarna
Copy link
Contributor

iarna commented Apr 11, 2015

The current behavior was intended when this was implemented, as such I'm flagging this as a feature request.

@iarna
Copy link
Contributor

iarna commented Mar 18, 2016

It’s my view that this adds additional complexity to story around package arguments as they’re passed to npm install. npm went through several variations on how it resolved local arguments when they were first added and the current behavior seemed to be the least confusing solution. The consensus of the CLI team is that this isn’t something we’re going to implement or accept as a pull request. As such, I’m going to close this issue, but thank you for bringing this up.

@iarna iarna closed this as completed Mar 18, 2016
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