Issue Description
I'm using Webpack with core-js polyfill in my Node.js project relying on Sequelize library. I decided to make an earlier migration from Sequelize 5 to Sequelize 6 but was unable to make it working to due this error:
/home/ezze/Development/geobase/node_modules/lodash/lodash.js:11927
throw new Error(CORE_ERROR_TEXT);
^
Error: Unsupported core-js use. Try https://npms.io/search?q=ponyfill.
at Function.isNative (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:11927:15)
at _.mergeWith (/home/ezze/Development/geobase/node_modules/sequelize/lib/utils.js:54:42)
at baseMergeDeep (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3643:11)
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:3603:11
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:4905:15
at baseMerge (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3600:7)
at baseMergeDeep (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3689:9)
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:3603:11
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:4905:15
at baseMerge (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3600:7)
at baseMergeDeep (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3689:9)
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:3603:11
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:4905:15
at baseMerge (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3600:7)
at baseMergeDeep (/home/ezze/Development/geobase/node_modules/lodash/lodash.js:3689:9)
at /home/ezze/Development/geobase/node_modules/lodash/lodash.js:3603:11
What are you doing?
Upgrading Sequelize 5 => 6. I narrowed down the problem and created a repo to reproduce it. The issue is caused by _.isNative() function that is incompatible with core-js and is used by mergeDefaults utility function of Sequelize.
This method can't reliably detect native functions in the presence of the core-js package because core-js circumvents this kind of detection. Despite multiple requests, the core-js maintainer has made it clear: any attempt to fix the detection will be obstructed. As a result, we're left with little choice but to throw an error. Unfortunately, this also affects packages, like babel-polyfill, which rely on core-js.
What do you expect to happen?
The code working in Sequelize 5 to work in Sequelize 6.
What is actually happening?
An error
Error: Unsupported core-js use. Try https://npms.io/search?q=ponyfill.
is thrown.
Environment
- Sequelize version: 6.0.0-beta.6
- Node.js version: 10.21.0
- Operating System: Ubuntu 18.04 LTS
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?
Issue Description
I'm using Webpack with core-js polyfill in my Node.js project relying on Sequelize library. I decided to make an earlier migration from Sequelize 5 to Sequelize 6 but was unable to make it working to due this error:
What are you doing?
Upgrading Sequelize 5 => 6. I narrowed down the problem and created a repo to reproduce it. The issue is caused by
_.isNative()function that is incompatible withcore-jsand is used bymergeDefaultsutility function of Sequelize.What do you expect to happen?
The code working in Sequelize 5 to work in Sequelize 6.
What is actually happening?
An error
is thrown.
Environment
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?