4

The only questions I found in my search yielded upgrading NPM modules to the latest.

Is there a way to make it so NPM downloads the latest compatible modules with your running node version?

Typically, if you npm install [module] and node isn't compatible, it will just throw an error. Can NPM see your running Node version and pick the most latest version that will run on it (without having to find the version yourself, and run npm install [module]@[version])?

Sterling Archer
  • 22,070
  • 18
  • 81
  • 118
  • May want to check out https://www.npmjs.com/package/npm-compat – Stanley Apr 13 '16 at 19:17
  • 2
    After some research: There is a [module on NPM called `npm-compat`](https://www.npmjs.com/package/npm-compat) that does this. Unfortunately it doesn't have a repository field so I can't look at the code (cleanly) and it doesn't have many downloads. – Benjamin Gruenbaum Apr 13 '16 at 19:18
  • possible duplicate: http://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-packages-json that said, I think it's on the user of the module to make sure that their version of node is compatible with the module as of npm 3. – Cuthbert Apr 13 '16 at 20:32
  • @Cuthbert not really a duplicate, that talks about adding versions to the package.json file, which means you have an established compatibility (I would hope) version – Sterling Archer Apr 13 '16 at 20:49
  • Have you looked at [this](https://www.npmjs.com/package/npm-check-updates) package? – Radoslav Stoyanov Apr 13 '16 at 21:14

0 Answers0