akemi
akemi13mo ago

Action using twilio won't compile

I'm using "use node" as shown in the docs but i still get a node compilation error. any tips?
No description
7 Replies
ballingt
ballingt13mo ago
Is there another, non-"use node" file that imports this one? Only other "use node" files should import "use node" files.
akemi
akemiOP13mo ago
How can i respond to a http request using a node library, if functions cannot use node or import node actions?
json
json13mo ago
@ballingt same problem here
ballingt
ballingt13mo ago
are @json any non-"use node" files importing "use node" files?
json
json13mo ago
Yes, the convex http functions that can't "use node"
ballingt
ballingt13mo ago
You'll need to use ctx.runAction(api.thatFile.foo, {}) to switch runtimes, you can't call those functions directly or import from those files in http.ts.
akemi
akemiOP13mo ago
Thanks, it worked! 👍

Did you find this page helpful?