If you're relying on npm modules that don't work in your environment, there are only four choices I can think of:
- Switch to modules that do work in your own environment that cover the same functionality.
- Fix the modules in question by modifying them to work in the target environment
- Ditch the modules entirely and write the necessary code yourself
- Find an earlier version of the module (via Github) that was compatible with a version of node.js before v6. Unless this is something first released in the last year, there are probably earlier versions that worked with earlier versions of node.js.
Fix could involve fixing a bug or two or it could involve transpiling them yourself to an ES5 target - depending upon what the issues are.
There's probably a combination of 2) and 3) that has you borrowing just what you absolutely need from the module and fixing it for node v5 and adding it to your project or forking it on Github. NPM modules are generally open source which gives you "fix it yourself" options.
Note: If you showed a precise example of exactly what the problem was running something under node v5, we could help more specifically with which option might be simplest. But, without any detail like that, all we can really do is describe the overall options for you to choose from.
Oh, and I'd hammer on the cloud service to really let them know about this loud and clear. 5.x has NO long term support from the node.js foundation and never did. It simply should NOT be a deployment version as odd versions are always experimental and never get long term support. 6.x is the current active LTS (long term support) version of node.js released 9 months ago. Even v4.x is under maintenance until April 2018. If your hosting provider is only offering 5.x and not letting you run your own version or pick a supported and more modern version, they are simply not a very good hosting provider for node apps.