Cannot find module 'core-js/modules/es.array.iterator.js'
Environment
System:
OS: macOS 11.4
Binaries:
Node: 14.17.0
npm: 7.19.1
npmPackages:
@linaria/babel-preset: 3.0.0-beta.4
@linaria/core: 3.0.0-beta.4
@linaria/react: 3.0.0-beta.7
@linaria/shaker: 3.0.0-beta.7
@linaria/webpack-loader: 3.0.0-beta.7
next: 11.0.1
webpack: 5
Description
I'm trying to use linaria version 3-beta in next.js, but when starting the development server it's throwing the error MODULE_NOT_FOUND, see the screenshot below:
Reproducible Demo
I'm using [email protected]
Repository for reproduce: next-linaria-beta-repro
I solved this problem by installing core-js manually, but of course this is not a package level solution
I'm having the same issue
The provided repo works perfectly fine. Could someone please provide a broken one? :)
Take a look at here, the difference with the next.js example is the version
next.js example:
"dependencies": {
"linaria": "^2.1.0",
"next": "latest",
"next-linaria": "^0.10.0",
},
the broken:
"dependencies": {
"@linaria/babel-preset": "3.0.0-beta.4",
"@linaria/core": "3.0.0-beta.4",
"@linaria/react": "3.0.0-beta.7",
"@linaria/shaker": "3.0.0-beta.7",
"@linaria/webpack-loader": "3.0.0-beta.7",
"next": "latest",
"next-linaria": "1.0.0-beta",
},
Oops. I see it now. It appeared, that our core-js detector is broken and styled requires a lot of polyfills. Thank you!
Five excess symbols require 6 additional polyfills. 🤦