[BUG] TypeError: 'createServer' is not a function

Hello,

We were using the http package inside a custom function and noticed that the function was throwing errors we could not reproduce locally.
After some investigation we saw that the “createServer” function of the http package is not working.
It should be supported inside the node version mongo is using: HTTP | Node.js v10.24.1 Documentation
Also it is stated as fully supported inside the MongoDB documentation: https://docs.mongodb.com/realm/functions/built-in-module-support/

So there seems to be a bug here.

Best Regards,
Daniel

Thanks Daniel - are you able to share details of your function? Or a repo so we can try to re-create and see what’s happening?

The http(s) objects are supported except for the Server class. We’ve updated the docs accordingly.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.