Upgrade Node.js version (from v10 to v14/v16)
It would be great if you can upgrade the version of Node.js used in Realm Functions (currently in version 10.18.1). Version 10.x, which was an LTS, has been unmaintained for many years. The end of life of Node v12 is scheduled for April 2022.
Is it possible to upgrade Node to version 14 (at least)? Another feature would be to let us choose the Node.js runtime version directly from Realm UI or the CLI (it's possible for example with AWS Lambda).
Working with Node v10 is really difficult for us since most of the dependencies are not compatible with it.
More info about Node.js releases / roadmap here: https://nodejs.org/en/about/releases/
@laura, any updates you can provide about this project now that we're 3 months on from your initial post? Just looking for some reassurance that this significant issue will get better soon. Thanks
Hey Laura, good to finally hear the team is gonna work on this. Examples of packages that don't work and issues we've had with this old node version are as follows:
- Sentry doesn't work at all (@sentry/node): this is a popular logging service that we use to log errors across our stack (web/mobile/[backend]). Currently, we can't get our code logs from mongodb functions. The log forwarder feature isn't useful so don't suggest it (because the log forwarded just dumps everything, we want just the logs we specify write in our code)
- Stripe (payments), we are using a super old version to get around this
- Uploading binary files with FormData. MongoDB forms only support strings. We get errors as soon as we try to send a FormData with a field that is binary.
- Packages that use JWTs are also broken (as mentioned below). These are 3rd party packages (we know MongoDB provides JWT in the context).
- And basically, any nodejs library that has a dependency on any of the things mentioned above or language features from later versions of node.
Node 10 is very old, we need at least node 16 or better the ability to choose the node version for each function or app.
Hi all, we're excited to be kicking off a project this quarter focused on improving Atlas Functions based on feedback we've heard from you. It's a top priority on our roadmap and we'll definitely keep you updated on details as they become available. In the meantime, we do track requests around unsupported packages so if there are specific ones you're running into issues with or would like to see, please drop a comment. Thanks!
We need this too. The latest popular libraries don't work with this ancient node 10 version. Please upgrade to the latest LTS as soon as possible or let us choose the versions.
Oh no, this is now becoming a deal breaker for my company too. Since the MongoDB team doesn't seem to read this anyway: any good alternative vendors or workarounds anyone found?
Joshua Moonstar commented
I would love it if each App Services Function could individually choose which Node version to use.
Discovered that @mapbox/mapbox-sdk doesn't work... :-(
The latest major versions of both the Twilio and Stripe libraries no longer work in Atlas functions. This is critical now. In the not too distant future the previous major versions will be unsupported, which is an untenable situation to be in.
To quote an earlier poster: "Dear Mongodb team, could you give [us] a short feedback if this is on your roadmap?"
Otherwise, I will have to seriously reconsider how much I'm leveraging Atlas. I don't mean that in a sassy way, just literally I can't get my business in a situation where our other vendors won't support us, and Atlas is forcing that situation on me at this point.
One major issue now is that major packages, like jsonwebtoken, no longer support Node v10. This means downgrading to unsecure, unsupported packages or just not using Functions at all.
This is has started becoming more problematic lately and cost us time trying to utilize certain libraries that aren't supported. LTS is now 18.15. I'd like to see a move to at least v16 at this point.
Dear Mongodb team,
could you give as a short feedback if this is on your roadmap?
The issue is that we have to use old versions of sdks which will reach their end-of-support soon.
As an example, the aws-sdk is currently only usable in v2 which will be put in maintenance mode by aws this year (2023).
It will then still be usable but after that they will discontinue support which means that it is not garanteed to work anymore.
While this is still in the future, it would be reassuring to know that you have plans to upgrade the node version.
Thanks in advance for your answer.
I love App Services, but this is the kind of thing that when you find out about it you start to question the platform. Having a node version this out of date is simply unacceptable. Beyond appearances, I ran into issues with the date-fns-tz module because of node v10's limited support for Intl.
I found Atlas App Services super great platform and planning to launch my business there. However got very disappointed when faced with the fact I am stuck with Node v10 here. I need v16, now. Even firebase-admin does not run as dependency now.
Mongo team please react ASAP! This shouldn't take much effort to upgrade and you would make many developers happy and even more attracted to your platform.
6 months later, no improvements. In the meantime, Node 18 has just been released.
This is very important, we can't use simple things like `Promise.allSettled` `Intl` API as well as other juicy things as well. I am so tired of doing polyfill for things that already exist.
It is important. Node v10 is really hard to work with!
i'm using vercel api router to use modern JS third party via realm HTTP function call.
it is so tired.. :(