primefaces / primeng

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

Primeng12 regression : not working anymore on angular libraries (Maximum call stack size exceeded) #10515

Closed adessilly closed 2 years ago

adessilly commented 2 years ago

I'm submitting a ...

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports) It is not possible to demonstrate on stackblitz because it is a bug at compile time for an angular library. Find a minimalistic library project here (it is just a ButtonModule importer on an empty library) : https://github.com/adessilly/primeng12libissues You can check the build error here : https://github.com/adessilly/primeng12libissues/runs/3361155275?check_suite_focus=true

Capture d’écran 2021-08-18 à 15 06 02

Current behavior ✖ Compiling with Angular in legacy View Engine compilation mode. Maximum call stack size exceeded

Expected behavior The build should work (it works with primeng11)

Minimal reproduction of the problem with instructions

ng new primeng12libissues
cd primeng12libissues/
ng g library testlib
npm i primeng@12

Then import ButtonModule in the lib module

Then run : ng-packagr -p projects/testlib/ng-package.json

What is the motivation / use case for changing the behavior? Our libraries don't compile anymore

Please tell us about your environment: terminal

gzayat commented 2 years ago

I have same problem using primeNG version 12 and ng-packagr generate module;

Maximum call stack size exceeded

yigitfindikli commented 2 years ago

View Engine is deprecated. See: https://angular.io/guide/updating-to-version-12.

adessilly commented 2 years ago

@yigitfindikli What do you mean ? In tsconfig, I can put "enableIvy": false or "compilationMode": "partial", the problem remains the same with your primeng12. But With primeng11, no issues at all, even in an angular12 libraries.

yigitfindikli commented 2 years ago

@adessilly

Try with:

package.json => scripts "build:lib": "ng build testlib"

adessilly commented 2 years ago

@yigitfindikli thx :-)

gzayat commented 2 years ago

Using -ng serve -ng build

no problem.

But i will use ng packagr for generate component Maximum call stack size exceeded./

Remove primeng this modules, resolve problem

gzayat commented 2 years ago

Add in project one item of primeng import {ButtonModule} from 'primeng/button/primeng-button';

Error 'Maximum call stack size exceeded' persist to generate npm run packagr using in package.json lib ng-packagr

using npm build not problem. Problem persist using packagr for generate component

gzayat commented 2 years ago

@yigitfindikli

problem solved using Using angular 12 ng-packagr 12.2.1 with primeng version 11.4.0

jmls commented 2 years ago

this is not "solved" ! The solution is to use primgeNg 11 - what about those who are using primeNg 12 ?

I have the same error trying to build a library with angular 12 and primeng 12

adessilly commented 2 years ago

@jmls , In my case, it works with primeng12 and angular12 by following the advice of @yigitfindikli , I had to change the way to build my lib from : "ng-packagr -p projects/xxx"
to : "ng build xxx"

jmls commented 2 years ago

that's odd .. my build command is

ng build mylib --configuration production

vittal288 commented 1 year ago

Still getting the same error Maximum call stack size exceeded

image image