-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething that isn't workingSomething that isn't workingregressionBreak in existing functionality as a result of a recent changeBreak in existing functionality as a result of a recent change
Description
What versions & operating system are you using?
wrangler 4.16
Please provide a link to a minimal reproduction
https://github.com/zhelezkov/cf-workers-eval-issue
Describe the Bug
After upgrading from Wrangler 4.15 to 4.16, Cloudflare Workers fail to deploy or run when dependencies contain eval statements. This affects several popular libraries, including js-sha256@0.9.0, which has more than 1M downloads.
Probably related to cloudflare/workerd#4142
Reproduction Steps
- Install dependencies with
npm install - Try to deploy or run locally with
npm run devornpm run deploy - Observe the failure when using Wrangler 4.16
- Downgrade to Wrangler 4.15 to confirm the issue is resolved
Workaround
Downgrade to Wrangler 4.15:
npm install wrangler@4.15.0 --save-devExpected Behavior
Workers should deploy and run successfully with libraries containing eval, as they did in Wrangler 4.15 and earlier versions.
Environment
- Node.js version: v22.16.0
- Wrangler version: 4.16.1 (broken), 4.15.0 (working)
- Operating system: macOS Sequoia 15.5
Please provide any relevant error logs
✘ [ERROR] service core:user:cf-workers-eval-issue: Uncaught Error: EvalError: Code generation from strings disallowed for this context
at null.<anonymous> (index.js:1260:22) in nodeWrap
at null.<anonymous> (index.js:1245:21) in createMethod
at null.<anonymous> (index.js:1626:21)
at null.<anonymous> (index.js:1642:7) in node_modules/js-sha256/src/sha256.js
at null.<anonymous> (index.js:12:50) in __require
at null.<anonymous> (index.js:1666:32)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that isn't workingSomething that isn't workingregressionBreak in existing functionality as a result of a recent changeBreak in existing functionality as a result of a recent change
Type
Projects
Status
Done