For Workes & Pages, what is the name of the domain?
example.com
What is the issue or error you’re encountering
Error: Failed to publish your Function. Got error: Uncaught Error: Dynamic require of “node:crypto” is not supported.
What steps have you taken to resolve the issue?
Added the nodejs_compat compatibility.
Build
Error
1 Like
Erisa
August 4, 2024, 12:07am
2
What is the code in your project that is trying to use node:crypto?
Are you using module worker syntax? Importing these things may not work correctly on service worker syntax.
Also, you may find more help in the Cloudflare Developers Discord community: https://discord.gg/cloudflaredev
I had a similar error when using remix-run.
I found the solution is to make sure that I was importing the serverless versions of my framework dependances in my case from @remix-run/cloudflare
instead of the node version from @remix-run/node
system
Closed
September 24, 2024, 8:26am
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.