I have a module called \'sails-mongo\' and I want to update it to the newest version using the following command:
npm update sails-mongo --save
I had a similar issue. Via the NPM Registry I was trying to get the latest from a project I saw in in GitHub, like this:
//package.json
"devDependencies": {
"foo-package": "^3.3.0",
}
But the code I got back from npm install
(as observed in the node_modules/
folder) was not what I saw in GitHub repository's master branch. I was confused; as the two didn't match.
I eventually found: https://docs.npmjs.com/cli/view, which reveals some information (versions and dates) of what the NPM Registry is aware of for a particular repository.
// Console example
npm view foo-package
After confirming that what I wanted from GitHub repository's master branch wasn't in the NPM Registry, I eventually changed my approach Git URLs as Dependencies, just as @apsillers answers.