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

Cannot find module 'core-js/modules/es.array.iterator.js' #799

Closed
iamyuu opened this issue Jul 11, 2021 · 6 comments
Closed

Cannot find module 'core-js/modules/es.array.iterator.js' #799

iamyuu opened this issue Jul 11, 2021 · 6 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: monorepo 🔱 Issues related to usage of linaria in monorepo needs: complete repro 🖥️ Issue need to have complete repro provided platform: next.js 🛠️ Issue related to next.js platform: ssr 🛠️ Issue related to SSR

Comments

@iamyuu
Copy link

iamyuu commented Jul 11, 2021

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:

Screen Shot 2021-07-11 at 20 07 31

Reproducible Demo

I'm using next-lerna@1.0.0-beta

Repository for reproduce: next-linaria-beta-repro

@iamyuu iamyuu added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Jul 11, 2021
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler platform: next.js 🛠️ Issue related to next.js platform: ssr 🛠️ Issue related to SSR cat: monorepo 🔱 Issues related to usage of linaria in monorepo and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Jul 11, 2021
@pure-js
Copy link

pure-js commented Jul 16, 2021

I solved this problem by installing core-js manually, but of course this is not a package level solution

@codejet
Copy link

codejet commented Jul 18, 2021

I'm having the same issue

@Anber
Copy link
Collaborator

Anber commented Jul 22, 2021

The provided repo works perfectly fine. Could someone please provide a broken one? :)

@iamyuu
Copy link
Author

iamyuu commented Jul 22, 2021

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",
  },

@Anber
Copy link
Collaborator

Anber commented Aug 8, 2021

Oops. I see it now. It appeared, that our core-js detector is broken and styled requires a lot of polyfills. Thank you!

@Anber
Copy link
Collaborator

Anber commented Aug 8, 2021

Five excess symbols require 6 additional polyfills. 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: monorepo 🔱 Issues related to usage of linaria in monorepo needs: complete repro 🖥️ Issue need to have complete repro provided platform: next.js 🛠️ Issue related to next.js platform: ssr 🛠️ Issue related to SSR
Projects
None yet
Development

No branches or pull requests

4 participants