Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Node > 16.17.1: Method Promise.prototype.then called on incompatible receiver #203

Closed
2 tasks
mwienk opened this issue Jan 11, 2023 · 5 comments
Closed
2 tasks
Labels
bug Something isn't working

Comments

@mwienk
Copy link

mwienk commented Jan 11, 2023

Please provide the environment you discovered this bug in.

node: v16.18.0 and higher

Which area/package is the issue in?

astro-angular

Description

I'm receiving an error when I start the sample from https://analogjs.org/docs/packages/astro-angular/overview. At the moment I connect angular into the astro application, it crashes upon requesting the page through the browser.

It might be related to angular/angular#47872, but as the fix there is implemented through @nguniversal/builders I doubt it will fix the issue for @analogjs/astro-angular.

Please provide the exception or error you saw

error   Method Promise.prototype.then called on incompatible receiver [object Object]
TypeError: Method Promise.prototype.then called on incompatible receiver [object Object]
    at ZoneAwarePromise.then (<anonymous>)
    at node:internal/per_context/primordials:440:35
    at new Promise (<anonymous>)
    at new SafePromise (node:internal/per_context/primordials:408:29)
    at node:internal/per_context/primordials:440:9
    at Array.map (<anonymous>)
    at arrayToSafePromiseIterable (node:internal/per_context/primordials:437:5)
    at node:internal/per_context/primordials:453:21
    at new Promise (<anonymous>)
    at primordials.SafePromiseAll (node:internal/per_context/primordials:452:3)

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@mwienk mwienk added the bug Something isn't working label Jan 11, 2023
@mwienk mwienk changed the title Node > 16.17.1: Method Promise.prototype.then called on incompatible receiver [BUG] Node > 16.17.1: Method Promise.prototype.then called on incompatible receiver Jan 11, 2023
@brandonroberts
Copy link
Member

Thanks @mwienk. I've seen this issue also and still investigating a proper fix/workaround

@brandonroberts
Copy link
Member

brandonroberts commented Jan 21, 2023

I've had success with node versions 16.17.x and18.13.0

@JeanMeche
Copy link
Contributor

FYI a PR has landed for this : angular/angular#49144

@brandonroberts
Copy link
Member

@JeanMeche awesome. Thanks for the update

@brandonroberts
Copy link
Member

This issue has been resolve with at least Node v18.13.0 and the fixes landed in Angular v15/16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants