getting this error

getting this error
No description
9 Replies
juanferreras
juanferreras2mo ago
Workers disables eval / new Function() at a runtime level for security reasons – is that your own authored code or is there any tool transpiling it like that?
iamjoey.sol
iamjoey.solOP2mo ago
may be a tool, i just created a nextjs project and added kv bindings and ran preview:worker and encountered this error
juanferreras
juanferreras2mo ago
what do you have on your ./worker-next/index.mjs ? or is that being generated through babel/tsc/any tool? (and you're writing your source code in a different file)
iamjoey.sol
iamjoey.solOP2mo ago
yes i guess this could be the reason it's a ts project
juanferreras
juanferreras2mo ago
check on that tooling - see if it's using any weird tsconfig or tooling
iamjoey.sol
iamjoey.solOP2mo ago
a bunch of code compiled to js
juanferreras
juanferreras2mo ago
it shouldn't output eval to do a require if you can get that fixed it should work
iamjoey.sol
iamjoey.solOP2mo ago
ok will look into that
juanferreras
juanferreras2mo ago
Cloudflare Docs
JavaScript and web standards · Cloudflare Workers docs
Standardized APIs for use by Workers running on Cloudflare's global network.

Did you find this page helpful?