Skip to content

Wrangler crashes with "fileURLToPath undefined" when using uuid@11 (ESM) in Workers #11957

@abrtwcom

Description

@abrtwcom

What versions & operating system are you using?

OS: Debian 13 (Linux x86_64)
Node.js: v20.x
npm: v10.x
Wrangler: 4.59.0 (update available 4.59.2)
Workers compatibility date: 2026-01-16 (falls back to 2026-01-11)

Please provide a link to a minimal reproduction

Not yet available. The issue occurs in a Cloudflare Worker using uuid@11 (ESM). I can provide a minimal reproduction repository if required.

Describe the Bug

Description

Running wrangler dev or wrangler deploy crashes during Workers runtime startup
(not during build time) with the following error.

The same code works correctly in a normal Node.js environment.


Steps to Reproduce

  1. Create a Cloudflare Worker (ESM)
  2. Install uuid v11:
    npm install uuid@11
    
    
    
    

Please provide any relevant error logs

Additional note:
This appears related to uuid@11 using Node-specific fileURLToPath logic,
which may not be supported in the Workers runtime environment.
Downgrading uuid or using crypto.randomUUID() may work as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions