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

npm run build failed for browser #2

Closed
topelinux opened this issue Jul 11, 2020 · 3 comments
Closed

npm run build failed for browser #2

topelinux opened this issue Jul 11, 2020 · 3 comments

Comments

@topelinux
Copy link

build failed in browser

src/client/publish_test.ts
error TS2318: Cannot find global type 'AsyncIterableIterator'.

src/client/base_client.ts:129:23 - error TS2304: Cannot find name 'AsyncIterable'.

129   abstract iterate(): AsyncIterable<PublishPacket | PubrelPacket>;
                          ~~~~~~~~~~~~~

src/client/base_client.ts:129:23 - error TS4055: Return type of public method from exported class has or is using private name 'AsyncIterable'.

129   abstract iterate(): AsyncIterable<PublishPacket | PubrelPacket>;
                          ~~~~~~~~~~~~~

src/client/base_client.ts:147:21 - error TS2304: Cannot find name 'AsyncIterable'.

147   async *iterate(): AsyncIterable<PublishPacket | PubrelPacket> {
                        ~~~~~~~~~~~~~

src/client/base_client.ts:147:21 - error TS4055: Return type of public method from exported class has or is using private name 'AsyncIterable'.

147   async *iterate(): AsyncIterable<PublishPacket | PubrelPacket> {
                        ~~~~~~~~~~~~~


Found 5 errors.
@jdiamond
Copy link
Owner

Sorry, not sure what I did to break this but it's happening for me now, too. There is a version in npm and on unpkg.com that did successfully build a few commits behind master so I'll track down how it broke and let you know.

jdiamond added a commit that referenced this issue Jul 11, 2020
@jdiamond
Copy link
Owner

I added "esnext.asynciterable" to the tsc --lib option and now it builds. Still not clear to me why it appears to have worked before without that and why it's not needed in the node build. 🤷

@topelinux
Copy link
Author

It works. Thanks

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

No branches or pull requests

2 participants