Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular UNIVERSAL prerender error Method Promise.prototype.then called on incompatible receiver [object Object]

I'm having problems rendering my site, in the past it worked fine but i had to reinstall node and angular and it stops working I'm on a m1 macbook pro.

Angular: 14.2.7

Node: v16.18.0

✖ Prerendering routes to /Users/anya/Documents/dev/practice-landing/dist/siem-new-landing/browser failed. Method Promise.prototype.then called on incompatible receiver [object Object]

like image 988
AnyaDevPrincess Avatar asked Jun 15 '26 21:06

AnyaDevPrincess


2 Answers

I was facing similair issue with my Azure Pipelines when the NodeJS version wasn't defined, then it took the latest LTS v16.18.0. I think there is a issue with NodeJS v16.18.0 and Angular compatibility. As a temporary workaround, I did downgrade the NodeJS to v16.17.1 which fixed the issue as of now. Will update this reply if I find a permanent solution.

UPDATE: After upgrading to Angular v15, the compatibility issue with NodeJS v16.18.0 has been fixed and Azure Pipelines works with LTS too.

like image 98
simfyz Avatar answered Jun 18 '26 12:06

simfyz


same here: Angular 14.1.3 & azure pipelines. Specifying FROM Node 16.17 in dockerfile solved it for now. thanks!

like image 24
sidewinder Avatar answered Jun 18 '26 12:06

sidewinder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!