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

Uncaught ReferenceError: _forEachInstanceProperty is not defined #12863

Closed
1 task
Edge00 opened this issue Feb 23, 2021 · 14 comments · Fixed by #12869
Closed
1 task

Uncaught ReferenceError: _forEachInstanceProperty is not defined #12863

Edge00 opened this issue Feb 23, 2021 · 14 comments · Fixed by #12869
Labels
i: bug i: needs triage i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Edge00
Copy link

Edge00 commented Feb 23, 2021

Bug Report

  • I would like to work on a fix!

Current behavior
Error occurred after upgrade to latest version

- Babel version(s): v7.13.1
- Node/npm version: v12.13.1
- OS: macOS 11.2.1
- Monorepo: No
- How you are using Babel: webpack

image

@babel-bot
Copy link
Collaborator

Hey @Edge00! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@simaQ
Copy link

simaQ commented Feb 23, 2021

I got another error when i upgrade to latest version.

Uncaught TypeError: _interopRequireDefault is not a function

@duan602728596
Copy link

I got another bug _Reflect$construct is not defined. I tested that I found that Babel compile is correct, but there is an error after packaging webpack.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 23, 2021

Oh thanks for investigating!
If you could share a small repository that shows it that would make it easier to fix the bug 🙏

@duan602728596
Copy link

Oh thanks for investigating!
If you could share a small repository that shows it that would make it easier to fix the bug 🙏

Maybe these are the same type of errors? This can be used as a reference.
https://github.com/duan602728596/webpack-class-bug
webpack/webpack#12758

@nicolo-ribaudo
Copy link
Member

Working on a fix

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 23, 2021

@dollysingh3192 (I'm replying here)

The PR that caused this is #12845.

Thanks btw @duan602728596 for the repo!

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 23, 2021

This should be fixed in @babel/helper-define-polyfill-provider 0.1.1; I'll publish a @babel/transform-runtime release to make it easier to force the upgrade if someone can confirm that it works.

nicolo-ribaudo added a commit that referenced this issue Feb 23, 2021
* Add failing test for #12863

* Minimal

* Ensure that `@babel/runtime-corejs2` imports are injected
@nicolo-ribaudo
Copy link
Member

I'm keeping this open until someone confirms that #12863 (comment) works and I release a transform-runtime version.

@dollysingh3192
Copy link

dollysingh3192 commented Feb 23, 2021

@nicolo-ribaudo ,

I checked and found that "./node_modules/@babel/runtime-corejs3/core-js-stable/reflect/construct.js" is injecting correctly 👍 with babel "7.13.0" successfully with @babel/helper-define-polyfill-provider 0.1.1 change.

But after this change jasmine test case's are failing. I raised a bug here previously where window.setTimeout and setTimeout was different. Here one is jasmine definition(which is correct) and other one is shim by babel

But now they both have same definition. Screenshot

Screen Shot 2021-02-23 at 5 47 14 PM

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 23, 2021

Thanks for confirming!

I would expect window.setTimeout and setTimeout to always be the same, since global functions (such as setTimeout) are what is defined on the window object.

However, if you want con continue the discussion about it and look for a workaround for what you need, please open an issue at https://github.com/babel/babel-polyfills 🙏 (I'm struggling to keep up with all the issue, so I'm trying to keep separate discussions in different places 😅)

@nicolo-ribaudo
Copy link
Member

This should be fixed now

@YanYuanFE
Copy link

"@babel/runtime-corejs3": "^7.13.6", not work

@YanYuanFE
Copy link

"@babel/plugin-transform-runtime": "^7.13.9", fixed.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jun 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: needs triage i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants