Unable to use a node package
I am creating an
http action
which imports the node package twilio
. I'm getting a series of errors for different packages used by twilio
, (e.g crypto, stream,) not found on the file system but built into node
:
Even when I add use node
on top of the action file. I'm still getting this error.2 Replies
Hi we don't currently support HTTP actions in node, but perhaps you could put the parts that use the twilio package into an
action
(which does work with "use node"
) and call it from the HTTP action using runAction
This article https://stack.convex.dev/stripe-with-convex has an example of doing thisWake up, you need to make money! (Add Stripe to your product)
If you’re building a full-stack app, chances are you’ll want some of your users to pay you for the service you provide. How to use Stripe with Convex ...
@sshader thanks. This article helped me to solve the issue.