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

Tailwind config "Cannot find module 'next/babel' #190

Open
Zoe-Bot opened this issue Jan 20, 2023 · 3 comments
Open

Tailwind config "Cannot find module 'next/babel' #190

Zoe-Bot opened this issue Jan 20, 2023 · 3 comments
Labels
bug Something isn't working frontend wontfix This will not be worked on

Comments

@Zoe-Bot
Copy link
Contributor

Zoe-Bot commented Jan 20, 2023

Describe the bug
Parsing error: Cannot find module 'next/babel'
Require stack:

  • C:\Users\joy-j\Desktop\projekts\wwweights\wwweights\frontend\node_modules\next\dist\compiled\babel\bundle.js
  • C:\Users\joy-j\Desktop\projekts\wwweights\wwweights\frontend\node_modules\next\dist\compiled\babel\eslint-parser.js
  • C:\Users\joy-j\Desktop\projekts\wwweights\wwweights\frontend\node_modules\eslint-config-next\parser.js
  • C:\Users\joy-j\Desktop\projekts\wwweights\wwweights\frontend\node_modules@eslint\eslintrc\dist\eslintrc.cjseslint

To Reproduce
Steps to reproduce the behavior:

  1. Open VSCode
  2. Open 'frontend/tailwind.config.js'
  3. const { fontFamily } = require('tailwindcss/defaultTheme') <-- hover over const

Expected behavior
No error.

Screenshots
image

Additional context
I already fixed this another time with this https://stackoverflow.com/a/68193974/14734868
But this caused another issue i cannot remember.

@Zoe-Bot Zoe-Bot added bug Something isn't working frontend labels Jan 20, 2023
@LarsFlieger
Copy link
Contributor

I tested it, this works on my end: https://stackoverflow.com/a/73890896/12160777

{
  "extends": [
    "next/babel",
    "next/core-web-vitals"
  ],
  "rules": {
    "semi": [
      "warn",
      "never"
    ],
    "quotes": [
      "warn",
      "double"
    ]
  }
}

@Zoe-Bot Zoe-Bot self-assigned this Jan 23, 2023
@Zoe-Bot
Copy link
Contributor Author

Zoe-Bot commented Jan 23, 2023

I tested it, this works on my end: https://stackoverflow.com/a/73890896/12160777

{
  "extends": [
    "next/babel",
    "next/core-web-vitals"
  ],
  "rules": {
    "semi": [
      "warn",
      "never"
    ],
    "quotes": [
      "warn",
      "double"
    ]
  }
}

Dann funktioniert der linter aber nicht mehr

@Zoe-Bot Zoe-Bot removed their assignment Jan 31, 2023
@Zoe-Bot Zoe-Bot modified the milestones: Sprint 5, Sprint 6 Feb 7, 2023
@LarsFlieger
Copy link
Contributor

The problem is deeper since NextJS is not using babel anymore because it switched to SWC with version 13.

The problem is not fixable with complex workarounds yet: https://stackoverflow.com/questions/68163385/parsing-error-cannot-find-module-next-babel

@LarsFlieger LarsFlieger added the wontfix This will not be worked on label Feb 14, 2023
@Zoe-Bot Zoe-Bot assigned LarsFlieger and unassigned LarsFlieger Feb 14, 2023
@Zoe-Bot Zoe-Bot removed this from the Sprint 6 milestone Feb 15, 2023
@Zoe-Bot Zoe-Bot mentioned this issue Feb 15, 2023
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants