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

core-js-compat@3.18.3 updated to 3.19.0 Object is not a function #1002

Closed
shanruo opened this issue Nov 1, 2021 · 7 comments
Closed

core-js-compat@3.18.3 updated to 3.19.0 Object is not a function #1002

shanruo opened this issue Nov 1, 2021 · 7 comments

Comments

@shanruo
Copy link

shanruo commented Nov 1, 2021

Through investigation, it was found that it was an error after editing and building after the latest change and upgrade. Latest submission([WIP] Changes from October 2021 TC39 meeting
#1001):https://github.com/zloirock/core-js/pull/1001/files
The screenshot of the error message is as follows:
issue

@shanruo shanruo changed the title core-js-compat@3.18.3 updated to 3.19.0 Obeject is not a function core-js-compat@3.18.3 updated to 3.19.0 Object is not a function Nov 1, 2021
@zloirock
Copy link
Owner

zloirock commented Nov 1, 2021

It can't be related to core-js-compat, it can be related to core-js-pure. #1001 is not merged or published. Could you add a reproducible example and report the problem environment?

@shanruo
Copy link
Author

shanruo commented Nov 1, 2021

The core changes are here:6123ff1
core-js-pure@3.18.3->@3.19.0,But this package depends on core-js-compat,The reproducible example is not easy to show, the scene is applied in a small program, and the downstream relies on this package,No error will be reported when running the previous version, and an error will be reported in the new version.Now I took the lock package to temporarily solve the problem in the application.
issue2

@zloirock
Copy link
Owner

zloirock commented Nov 1, 2021

So what about the environment?

@zloirock
Copy link
Owner

zloirock commented Nov 1, 2021

All changes in core-js-compat 3.18.3 -> 3.19.0 are in adding compat data mapping for NodeJS 17, Electron 16, Opera Android 65, so it CAN'T be related.

@zloirock
Copy link
Owner

zloirock commented Nov 1, 2021

Without a reproducible example, I can't say more, so I'm waiting for it.

@shanruo
Copy link
Author

shanruo commented Nov 2, 2021

I have found the cause of the problem. This version upgrade triggered my application environment bug.The main point of change is "var Object = global.Object",There is no Object in my application environment window,So I need to polyfill window.Object = Object,thanks,that's all. ღ( ´・ᴗ・` )

@shanruo
Copy link
Author

shanruo commented Nov 2, 2021

Add a screenshot
issue3

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

No branches or pull requests

2 participants