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

*__awaiter_1 is not defined* when use with plugin of capacitor #1916

Closed
lucascco opened this issue Oct 2, 2019 · 5 comments
Closed

*__awaiter_1 is not defined* when use with plugin of capacitor #1916

lucascco opened this issue Oct 2, 2019 · 5 comments
Labels

Comments

@lucascco
Copy link

lucascco commented Oct 2, 2019

Stencil version:

 @stencil/core@1.5.4

I'm submitting a:

[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

When use plugin of capacitor, always that I call the @method async, the error __awaiter_1 is not defined happen. This error happen when I try use the web component in Wordpress.

Steps to reproduce:

https://github.com/lucascco/reproduce-error-stencil-async

Other information:
Just follow steps in repository above to reproduce this erro.

@ionitron-bot ionitron-bot bot added the triage label Oct 2, 2019
@manucorporat
Copy link
Contributor

Seems related with microsoft/TypeScript#33547

@lotz
Copy link
Contributor

lotz commented Oct 8, 2019

We are also encountering this, not related to any plugins. It does occur when we pull in a Stencil component into another Stencil component, and they both use async/await.

@srclark213
Copy link

srclark213 commented Nov 5, 2019

I'm seeing a similar issue with @aspnet/signalr library. Something is defining an __awaiter function inside the signalr library, so when it gets pulled into our stencil component all of our awaits get compiled to calls to __awaiter_1. However whatever generates the __awaiter function for the component doesn't call it __awaiter_1, it just re-declares __awaiter, such that in the output file I have two declarations of __awaiter, but all the calls are to __awaiter_1.

Tried setting "noEmitHelpers": true in my tsconfig which fixed other cases of these types of collisions but not the signalr collisions.

@lotz
Copy link
Contributor

lotz commented Nov 15, 2019

Thanks for working around this @manucorporat! This was blocking us from upgrading to a newer version of Stencil.

@robinsummerhill
Copy link
Contributor

I'm also seeing this issue with Stencil 1.7.5. I can't upgrade to the version with the fix for this issue because it uses Typescript 3.7 and the generated component library is not compatible with Angular 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants