-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TypeError: Illegal invocation in custom-style.js with Babel v7.0.0-beta.51 #5256
Comments
@web-padawan If you remove the cast from the closure source, e.g. const style = this.querySelector('style'); Does this issue persist? I suspect it is babel not being able to work with the Closure cast in a variable declaration. |
@TimvdLippe yep that helped when I was investigating in the morning. For some reason, after I regenerated |
Actually, we have a reproduction for this issue here: vaadin/base-starter-react#12 So I'm reopening the issue for now. @TimvdLippe should we file a bug about the Closure cast failure to the Babel repo? Or is there a way to workaround it here? I'm not really familiar with the Closure annotations. |
@web-padawan Yes this looks like a Babel parser issue to me. It is perfectly valid JS to write. |
@web-padawan Were you able to report this issue to Babel? |
@TimvdLippe sorry, did not get a chance to create a reduced test case, but will hopefully get to it soon. Closing this issue, as it appears there is nothing much to do here for Polymer codebase. |
Sorry to re-open this but I couldn't find the description of this problem anywhere else on the internet. I also get this error with polymer and webpack:
Remaking the package-lock or node-modules has no effect, same error happens. |
Description
After upgrading to Babel v7.0.0-beta-51 released today, I get the following error:
Steps to Reproduce
npm i && npm run dev
Expected Results
No error thrown, as with Babel 7.0.0-beta.49 (same repo, master branch).
Actual Results
Error is thrown on this line. Babel inserts line break when transpiling it, but this also happened with 7.0.0-beta.49 and worked nice, so the true reason is likely somewhere else:
Browsers Affected
Not browser-specific.
Versions
I wasn't really sure whether I needed to file this issue under Babel repo, but let's start here.
/cc @bicknellr and note that I didn't upgrade the
@babel/plugin-transform-classes
, so the problem here is different one from the Polymer/tools#398 but also worth taking a look.If you are able to confirm this is a Babel issue, feel free to close it and let's raise a new issue there.
The text was updated successfully, but these errors were encountered: