Unable to run dev on any projects.

Somehow my environment is no longer able to run locally any worker. I even created a fresh "Hello World" worker and they all give the same error (see below). I noticed that I had lots of workerd processes running and killed them all (CPU was buring). Same issue after. Restarted, still same error below. Any suggestions?
/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/wrangler/wrangler-dist/cli.js:29573
throw a;
^

TypeError [ERR_INVALID_ARG_TYPE]: The "strategy" argument must be of type object. Received type number (0)
at new ReadableStream (node:internal/webstreams/readablestream:254:5)
at safeReadableStreamFrom (/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/miniflare/dist/src/index.js:8264:10)
at #handleLoopback (/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/miniflare/dist/src/index.js:8425:36)
at Server.emit (node:events:531:35)
at Server.emit (node:domain:488:12)
at parserOnIncoming (node:_http_server:1137:12)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) {
code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v21.7.1
/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/wrangler/wrangler-dist/cli.js:29573
throw a;
^

TypeError [ERR_INVALID_ARG_TYPE]: The "strategy" argument must be of type object. Received type number (0)
at new ReadableStream (node:internal/webstreams/readablestream:254:5)
at safeReadableStreamFrom (/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/miniflare/dist/src/index.js:8264:10)
at #handleLoopback (/Users/rm/Projects/c/CFWorkers/damp-hat-4c7d/node_modules/miniflare/dist/src/index.js:8425:36)
at Server.emit (node:events:531:35)
at Server.emit (node:domain:488:12)
at parserOnIncoming (node:_http_server:1137:12)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) {
code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v21.7.1
2 Replies
Chaika
Chaika9mo ago
Hey, It sounds like you hit this: https://github.com/cloudflare/workers-sdk/issues/5190 Try upgrading wrangler to @3.32.0 or downgrading node
GitHub
🐛 BUG: After upgrading nodejs to version 21.7.0 wrangler dev fail...
Which Cloudflare product(s) does this pertain to? Workers Runtime, Wrangler core, Miniflare What version(s) of the tool(s) are you using? 3.31.0 [Wrangler] What version of Node are you using? 21.7....
Roberto Machorro
Roberto MachorroOP9mo ago
Thanks, will give that a try Wrangler upgrade didn't fix. Same error, going to downgrade Node.
% npx wrangler dev
⛅️ wrangler 3.32.0
-------------------
% npx wrangler dev
⛅️ wrangler 3.32.0
-------------------
The issue was with node, thanks @Chaika ! The fix was released today as part for miniflare 3.20240304.1 !!! 😺
Want results from more Discord servers?
Add your server