As far as I understand currently it is not possible to use node/npm modules is Functions. Would be great to have it.
As part of our upcoming re-brand of "Stitch" to "Realm" we'll also be migrating our feedback forum and joining the rest of MongoDB at feedback.mongodb.com, as part of that transition, we'll be shutting down this forum. We're still keeping track of this feedback and all of the related comments/discussions, but all future updates will be made here:
ie. Same as Stitch currently has for AWS, but add a new service for Azure
We are planning on supporting the Azure SDK for Node as a part of our dependency resolution support. This request will therefore be merged into the broader Node support request.
Halo, will be great when it comes with SMTP, Mailgunt, etc.
Halo, will be great if upload service support more services like Google Cloud Storage, Google Drive, etc.
@Drew DiPalma is dns module currently lined up?
@Orville Lim: Hi Orville – It's on the list of pending functionality that we're currently working though. What package are you trying to use?
Hi Folks – After a lot of hard work here we believe that most (applicable/useful) packages should work within Stitch Functions! I've included links to the key documentation on this below. Barring any major feedback we will soon mark this feature as "GA" and I will close this feedback item as complete!
Module support: https://docs.mongodb.com/stitch/functions/upload-external-dependencies/#built-in-module-support
Direction to import: https://docs.mongodb.com/stitch/functions/import-external-dependencies/
If you run into any issues, please feel free to shoot me a message at firstname.lastname@example.org
@Drew DiPalma News ?
@Jonathan Gautier: Hi Jonathan – We're working through supporting the standard node libraries/other dependencies that packages rely on. Thee following libraries should work today either used directly or if required by a dependency: url, buffer, events, util, stream, assert, timers, process.
Still currently pending (but being actively worked on) are: crypto, zlib, net, tls, and http/https.
Hi Folks, I'm keeping this improvement "In-progress" but am excited to announce that we released this feature in beta today! You can read a bit more about it here: https://docs.mongodb.com/stitch/functions/upload-external-dependencies/
One caveat currently is that you can't use packages that make external calls today (which is why we've marked the feature as 'Beta') but we're actively working on lifting this limitation. From our prior survey here it seemed like basic NPM support would cover many use cases. Once we are able to broaden support, we'll be marking this feature as GA/marking this request as 'Complete'.
Hi Drew, will we also be able to use back-end dependencies like soap (https://www.npmjs.com/package/soap). Usually we can integrate with a REST interface, but sometimes our clients provide SOAP services where we need to integrate with.
Dependencies like "soap", "ftp" and "ioredis" are using Node.js features which are currently not supported with Stitch functions. Will we be able to use those modules within Stitch functions with this upgrade? Or will we only be able to use modules like "lodash", which are not depending on any Node.js or Browser API's.
Currently we are using Stitch operations if it is possible to use a Stitch operation, but because Stitch integration is limited to the provided services (AWS/Twilio) and HTTP we still need a container (like a Heroku dyno or an AWS EC2 instance) for the integration which could not be done with Stitch.
It would be great if we can shut the container down and only use Stitch.