Closed adessilly closed 2 years ago
I have same problem using primeNG version 12 and ng-packagr generate module;
Maximum call stack size exceeded
View Engine is deprecated. See: https://angular.io/guide/updating-to-version-12.
@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.
@adessilly
Try with:
package.json => scripts
"build:lib": "ng build testlib"
@yigitfindikli thx :-)
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
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
@yigitfindikli
problem solved using Using angular 12 ng-packagr 12.2.1 with primeng version 11.4.0
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
@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"
that's odd .. my build command is
ng build mylib --configuration production
Still getting the same error Maximum call stack size exceeded
I'm submitting a ...
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
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
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
Angular version: 12.2.1 It is the most recent version, but it works with primeng11, not with primeng12
PrimeNG version: ^12.0.2 (also tested with rc, same issue)
Browser: [none ] no need of a browser
Language: [TypeScript 4.3.5]
Node (for AoT issues):
node --version
= 15.3.0 (but tested on 14 and 16)