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

"make install" always installs latest version of npm #609

Closed
gmiroshnykov opened this issue Feb 18, 2011 · 8 comments
Closed

"make install" always installs latest version of npm #609

gmiroshnykov opened this issue Feb 18, 2011 · 8 comments

Comments

@gmiroshnykov
Copy link

When I download specific version of npm as a tarball, I expect that firing "make install" will install this particular version.
Instead of that, npm always does this:

node cli.js install npm

So it always installs the latest version, disregarding the actual sources from tarball.

I would like to provide a patch, but first I wanted to make sure this is a bug and not a desired behavior :)

@gmiroshnykov
Copy link
Author

Anyway, my quick-and-dirty fix: LaggyLuke/npm@ff83f1ba0d3b52568999dcdbd64b2d511eeb1f2f

I'm sure there's a better way to do it (starting with not parsing package.json with awk :)), but I need to get some advice on how to approach this and if it's worth approaching at all.

@isaacs
Copy link
Contributor

isaacs commented Feb 18, 2011

It's desired behavior. If you want the current version you're looking at, please use sudo make dev.

This is covered in the readme.

@gmiroshnykov
Copy link
Author

Ouch, this is emarassing. Note to self: RTFM.

Then just my $0.02:
A regular user that wants the latest version of npm will probably just do curl http://npmjs.org/install.sh | sh, while the person who did a git checkout for a specific tag or got a tarball will probably want that exact version to be installed by default.
He can do npm install npm any time later if he likes.

@isaacs
Copy link
Contributor

isaacs commented Feb 18, 2011

Yeah, I think that's fair, especially since the one-liner doesn't pull from the git repo any more, but directly from the registry latest. Reopening.

@gmiroshnykov
Copy link
Author

Great, so how can I help?

@isaacs
Copy link
Contributor

isaacs commented Feb 23, 2011

Closed by d7d8662 make install installs current, not latest

make latest to do the old behavior.

@isaacs
Copy link
Contributor

isaacs commented Feb 23, 2011

In this case, just posting the issue was very helpful. Thanks :)

@gmiroshnykov
Copy link
Author

Thanks for your work, Isaac!

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

No branches or pull requests

2 participants