isaacs/npm — Issue #1727: Updating git dependency urls does not work
Author: felixge
Created: 2011-11-17 08:49:06+00:00
State: open

Currently npm does not notice when the version reference of a previously installed package is upgrade to a git url.

So in order to get the right version one has to `rm -rf node_modules/` first before running `npm install` again.

**Example:** Consider the following package which had some changes in master after version 0.0.2 was released. Among them the Readme was modified:

```
$ npm install -S utest
utest@0.0.2 ./node_modules/utest
$ shasum node_modules/utest/Readme.md
c0f676fb3ccd4aa405c92451e3a9de53f23c39bf node_modules/utest/Readme.md
$ vim package.json
# Change utest version from "0.0.2" to "git://github.com/felixge/node-utest.git"
$ npm install .

$ shasum node_modules/utest/Readme.md
c0f676fb3ccd4aa405c92451e3a9de53f23c39bf node_modules/utest/Readme.md
# ^- Notice how the package has not been updated with the new code from git
$ rm -rf node_modules/utest
$ npm install .
utest@0.0.2 ./node_modules/utest
$ shasum node_modules/utest/Readme.md
0167009693fce6aa30e7ef6ea25406da8e1cc0b3 node_modules/utest/Readme.md
# ^- Notice how the package was now updated
```

Let me know if I can provide further details.

--fg