Skip to content

deno task build fails when trying to build default angular 20 project #31323

Description

@arnabanimesh

Version: Deno 2.5.6 (installed using winget)

Steps:

  1. Create a zoneless, vanilla angular 20 project with SSR, SSG, prefetch. (Used Angular 20.3.10)
  2. Try to build the project using deno by running deno task build

It shows the following error:

Task build ng build
Browser bundles
Initial chunk files  | Names            |  Raw size | Estimated transfer size
main-CWHAWT7Z.js     | main             | 248.01 kB |                68.70 kB
styles-5INURTSO.css  | styles           |   0 bytes |                 0 bytes

                     | Initial total    | 248.01 kB |                68.70 kB


Server bundles
Initial chunk files  | Names            |  Raw size
server.mjs           | server           |   1.30 MB |
main.server.mjs      | main.server      | 694.46 kB |
polyfills.server.mjs | polyfills.server | 233.48 kB |
chunk-L2MVFUKD.mjs   | -                |   1.32 kB |
chunk-T55IDOPT.mjs   | -                | 976 bytes |

Lazy chunk files     | Names            |  Raw size
chunk-HKQTHSU5.mjs   | xhr2             |  12.15 kB |
chunk-QN7HHIJH.mjs   | xhr2             |  12.08 kB |

Prerendered 0 static routes.
Application bundle generation failed. [4.829 seconds] - 2025-11-17T21:52:23.037Z

✘ [ERROR] An error occurred while extracting routes.

[ERR_UNSUPPORTED_ESM_URL_SCHEME] Only file and data URLs are supported by the default ESM loader. Received protocol 'memory'

When building normally using npm it succeeds:

> angular-demo@0.0.0 build
> ng build

Browser bundles
Initial chunk files  | Names            |  Raw size | Estimated transfer size
main-CWHAWT7Z.js     | main             | 248.01 kB |                68.72 kB
styles-5INURTSO.css  | styles           |   0 bytes |                 0 bytes

                     | Initial total    | 248.01 kB |                68.72 kB


Server bundles
Initial chunk files  | Names            |  Raw size
server.mjs           | server           |   1.30 MB |
main.server.mjs      | main.server      | 694.46 kB |
polyfills.server.mjs | polyfills.server | 233.48 kB |
chunk-L2MVFUKD.mjs   | -                |   1.32 kB |
chunk-T55IDOPT.mjs   | -                | 976 bytes |

Lazy chunk files     | Names            |  Raw size
chunk-HKQTHSU5.mjs   | xhr2             |  12.15 kB |
chunk-QN7HHIJH.mjs   | xhr2             |  12.08 kB |

Prerendered 1 static route.
Application bundle generation complete. [4.799 seconds] - 2025-11-17T21:53:56.946Z

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions