Failed to parse URL from [object Object]
# workers-help
c
My worker always gives this error when run in dev mode with the
--local
argument. As soon as I switch it off it starts working again though, I have no idea what's going on More details:
Copy code
[mf:err] GET /: TypeError: Failed to parse URL from [object Object]
    at new Request (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\undici\lib\fetch\request.js:81:15)
    at new Request (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\miniflare\node_modules\@miniflare\core\src\standards\http.ts:455:13)
    at EventTarget.dispatchFetch (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\miniflare\node_modules\@miniflare\core\src\index.ts:1077:51)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Server.<anonymous> (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\@miniflare\http-server\src\index.ts:291:20)
[mf:err] Cause: TypeError: Invalid URL
    at new NodeError (node:internal/errors:371:5)
    at onParseError (node:internal/url:552:9)
    at new URL (node:internal/url:628:5)
    at new Request (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\undici\lib\fetch\request.js:79:21)
    at new Request (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\miniflare\node_modules\@miniflare\core\src\standards\http.ts:455:13)
    at EventTarget.dispatchFetch (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\miniflare\node_modules\@miniflare\core\src\index.ts:1077:51)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Server.<anonymous> (C:\Users\user\Documents\blogm-wrangler\blogm\node_modules\@miniflare\http-server\src\index.ts:291:20)
GET / 500 Internal Server Error (502.63ms)
s
Could you try purging your node modules and reinstalling?
c
Makes no difference sadly
v
there is an active issue about this here https://github.com/cloudflare/miniflare/issues/454