You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compat matrix over at https://workers-nodejs-compat-matrix.pages.dev/ should probably be changed to be a "Mismatch" instead of a "Supported" for url.parse due to this (and no doubt other strings exhibit divergence too)
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Cloudflare Workers: wrangler 3.64.0 w/
experimental:nodejs_compat_v2
Reproduction
require('url').parse('/404')
Describe the bug
You get
TypeError: Failed to construct 'URL': Invalid URL
(or similar) due to unenv's use ofnew URL()
to parse.In Node.js, with
url.parse('/404')
you get:Additional context
This occurs in Next.js as it passes around "urls" like
/404
and/500
internally a lot.The code comments note divergence is potentially an issue – and indeed this is a case where it is.
The compat matrix over at https://workers-nodejs-compat-matrix.pages.dev/ should probably be changed to be a "Mismatch" instead of a "Supported" for url.parse due to this (and no doubt other strings exhibit divergence too)
Logs
No response
The text was updated successfully, but these errors were encountered: