0

I have a problem where the overall app is running in node12. But one of the dependencies have some issues with this version and need <=node11. Is there a way to specify a different node version for the dependency alone. (The referred module here is https://github.com/perezd/riemann-nodejs-client/issues)

randomness
  • 1,377
  • 1
  • 14
  • 21
  • Your node version is whatever version you install and run and it's the same node version for your entire app. You can't have a different node version for one module alone. So, if you want node <=11, then install that version and use it. If you really wanted to hack some things together, you could make multiple node apps that communicate via some form of IPC where one app was one node 11 with your dependent library and the other app was the rest of your functionality with node 12, but that would be a bit of a hack and probably a lot more work to write. – jfriend00 Jul 24 '15 at 06:20
  • PR [here](https://github.com/perezd/riemann-nodejs-client/pull/15), if you want to use it on Node 0.12 until it's merged, you can use `npm install robertklep/riemann-nodejs-client` for the time being (be aware that I have no experience with Riemann at all, I only fixed it so it passes the test cases provided). – robertklep Jul 24 '15 at 06:33
  • 1
    get rid of dependency which can't deal with node.js upgrade. – webduvet Jul 24 '15 at 09:24
  • Latest version (pushed last night) of `riemann-nodejs-client` installs properly on Node 0.12. – robertklep Jul 25 '15 at 04:14
  • @robertklep , Thanks a lot. I was trying to integrate with your commit id. The push will make it easy for my docker integrations. I will try this out – randomness Jul 27 '15 at 02:57
  • @robertklep the fix worked well – randomness Jul 28 '15 at 11:46
  • @randomness glad to hear. Please be aware that [an issue surfaced yesterday](https://github.com/perezd/riemann-nodejs-client/issues/16) that may cause some problems. It's not really a bug, it's actually a bug that got fixed which may cause some old code that relied on that bug to break. – robertklep Jul 28 '15 at 11:50

0 Answers0