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

Cannot read property 'value' of undefined #873

Open
make-github-pseudonymous-again opened this issue Aug 1, 2021 · 5 comments
Open

Cannot read property 'value' of undefined #873

make-github-pseudonymous-again opened this issue Aug 1, 2021 · 5 comments

Comments

@make-github-pseudonymous-again
Copy link

make-github-pseudonymous-again commented Aug 1, 2021

I am getting some interestingly erroneous builds for code relying on AsyncIterable and AsyncIterator. Steps to reproduce:

git clone https://github.com/async-abstraction/tape
cd tape
yarn
yarn test # This works fine
sed 's/[/][s][r][c][/][i][n][d][e][x][.][j][s]/\/dist\/index.modern.js/g' -i test/src/*.js
yarn test # Works fine too
git reset --hard HEAD
sed 's/[/][s][r][c][/][i][n][d][e][x][.][j][s]/\/dist\/index.module.js/g' -i test/src/*.js
yarn test # BROKEN (Cannot read property 'value' of undefined)
git reset --hard HEAD
sed 's/[/][s][r][c][/][i][n][d][e][x][.][j][s]/\/dist\/index.cjs/g' -i test/src/*.js
yarn test # BROKEN (Cannot read property 'value' of undefined)
@make-github-pseudonymous-again
Copy link
Author

make-github-pseudonymous-again commented Nov 9, 2021

Any idea if #565 or #707 (review) is related?

@make-github-pseudonymous-again
Copy link
Author

I see here that babel-plugin-transform-async-to-promises does not support async generators. Is this plugin still used? Is the logic to transpile async generators missing?

@make-github-pseudonymous-again
Copy link
Author

Still getting the error. I managed to write a GitHub worflow to automate testing all builds of async-abstraction/tape. You can see the error here.

@make-github-pseudonymous-again
Copy link
Author

@make-github-pseudonymous-again
Copy link
Author

make-github-pseudonymous-again commented Dec 7, 2021

I managed to get @async-abstraction/tape to work by replacing a bunch of for await ... syntax by await iterator.next() syntax, but that's not all that is needed. I hit some issues with switch statements, similar to #505, most notably non-working fall-through logic. I also hit my head on while ((await f()) !== x);. Will update the minimal bug reproduction.

EDIT: I updated https://github.com/bisectifiate/microbundle-async-generator with the one-liner while ... await example. I could not reproduce the switch fall-through

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

1 participant