Hello,
I have been try to use MongoDB Stitch to do some sever-less work pretty simple but without success.
I would like to ask to see if there is any workaround I can take.
- Http Request lib axios failed
My goal is to use Ghost Blog provided JavaScript client to create article when there is a new data insert to MongoDB.
The error I got from trigger is:
Error: StitchError: TypeError: ‘adapter’ is not a function"
I searched online, this is an error from axios which I believe Ghost Client use this to send http request under the hood.
- Handlebar failed
I use Handlebar to generate a HTML code, and this also failed with error message:
failed to execute source for ‘handlebars’: failed to execute source for ‘node_modules/handlebars/dist/cjs/handlebars’: failed to execute source for ‘node_modules/handlebars/dist/cjs/handlebars.runtime’: ReferenceError: ‘window’ is not defined
My question is axios module is a popular http module used in nodejs world. Is this not supported in Stitch or I did something wrong?
I can remove the need of using Handlebar module, but if there is a way can fix it would be great.
By the way:
- I have uploaded the module dependencies correctly.
- And also, the code is working on my local machine.
Thanks in advance.