primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.6k stars 4.62k forks source link

Vite - TypeError: fn is not a function #16813

Closed LMS5413 closed 3 days ago

LMS5413 commented 4 days ago

Describe the bug

I have updated AngularJS to v19 and this error appears if using SSR

08:29:09 [vite] Error when evaluating SSR module /@fs/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js?v=8846fd1e:
|- TypeError: fn is not a function
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:40)
    at Array.forEach (<anonymous>)
    at initFeatures (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:24)
    at Object.eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22430:5)
    at noSideEffects (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:12171:5)
    at Module.ɵɵdefineComponent (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22399:10)
    at Function.<static_initializer> (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1317:17)
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1257:34)
    at async instantiateModule (file:///mnt/ntfs2/Codes/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

08:29:09 [vite] Error when evaluating SSR module /@fs/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/primeng_autocomplete.js?v=8846fd1e:
|- TypeError: fn is not a function
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:40)
    at Array.forEach (<anonymous>)
    at initFeatures (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:24)
    at Object.eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22430:5)
    at noSideEffects (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:12171:5)
    at Module.ɵɵdefineComponent (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22399:10)
    at Function.<static_initializer> (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1317:17)
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1257:34)
    at async instantiateModule (file:///mnt/ntfs2/Codes/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

08:29:09 [vite] Error when evaluating SSR module /chunk-WOTBJJCX.mjs:
|- TypeError: fn is not a function
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:40)
    at Array.forEach (<anonymous>)
    at initFeatures (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:24)
    at Object.eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22430:5)
    at noSideEffects (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:12171:5)
    at Module.ɵɵdefineComponent (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22399:10)
    at Function.<static_initializer> (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1317:17)
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1257:34)
    at async instantiateModule (file:///mnt/ntfs2/Codes/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

08:29:09 [vite] Error when evaluating SSR module /main.server.mjs:
|- TypeError: fn is not a function
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:40)
    at Array.forEach (<anonymous>)
    at initFeatures (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:24)
    at Object.eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22430:5)
    at noSideEffects (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:12171:5)
    at Module.ɵɵdefineComponent (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22399:10)
    at Function.<static_initializer> (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1317:17)
    at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1257:34)
    at async instantiateModule (file:///mnt/ntfs2/Codes/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)

08:29:09 [vite] Internal server error: fn is not a function
      at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:40)
      at Array.forEach (<anonymous>)
      at initFeatures (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22539:24)
      at Object.eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22430:5)
      at noSideEffects (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:12171:5)
      at Module.ɵɵdefineComponent (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-QNLJ3MPZ.js:22399:10)
      at Function.<static_initializer> (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1317:17)
      at eval (/mnt/ntfs2/Codes/website/.angular/cache/19.0.1/website/vite/deps_ssr/chunk-YLWRO5PV.js:1257:34)
      at async instantiateModule (file:///mnt/ntfs2/Codes/website/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:52972:5)
 [vite] Error when evaluating SSR module

Environment


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

Angular CLI: 19.0.1
Node: 20.14.0
Package Manager: bun 1.1.36
OS: linux x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.1
@angular-devkit/build-angular   19.0.1
@angular-devkit/core            19.0.1
@angular-devkit/schematics      19.0.1
@angular/cli                    19.0.1
@angular/ssr                    19.0.1
@schematics/angular             19.0.1
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Reproducer

No response

Angular version

19.0.1

PrimeNG version

18.0.0-beta.5

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

Bun.sh 1.1.36+ededc168c

Browser(s)

Brave

Steps to reproduce the behavior

No response

Expected behavior

No response

mertsincan commented 3 days ago

Duplicate of https://github.com/primefaces/primeng/issues/16827