Skip to content

TypeError: e is not a function when serving production build #28358

Closed
@pawelfras

Description

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

Description

Fresh Angular 19.0.0-next.3 application with SSR (no custom code) fails while serving prod build via `serve:ssr:.

Minimal Reproduction

  • npx @angular/cli@19.0.0-next.3 new my-app
  • pnpm run build
  • pnpm run serve:ssr:my-app

Exception or Error

file:///Users/pawelfras/git/ng-19/dist/ng-19/server/main.server.mjs:1
import{a as u}from"./chunk-G42KAERA.mjs";import{f as e,o as t,q as o,r as p,s as a,t as n,u as r}from"./chunk-4E33NSMA.mjs";e();r();n();export{u as default,o as \u0275ServerRenderContext,a as \u0275destroyAngularServerApp,t as \u0275extractRoutesAndCreateRouteTree,p as \u0275getOrCreateAngularServerApp};
                                                                                                                            ^

TypeError: e is not a function
    at file:///Users/pawelfras/git/ng-19/dist/ng-19/server/main.server.mjs:1:125
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Node.js v22.8.0

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 19.0.0-next.3
Node: 22.8.0
Package Manager: pnpm 9.7.1
OS: darwin arm64

Angular: 19.0.0-next.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.0-next.3
@angular-devkit/build-angular   19.0.0-next.3
@angular-devkit/core            19.0.0-next.3
@angular-devkit/schematics      19.0.0-next.3
@schematics/angular             19.0.0-next.3
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.15.0

Anything else relevant?

No response

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions