angularserver-side-renderingangular-universalprerender

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]


Solution

  • 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.