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

[turborepo] Parsing error: Cannot find module 'next/babel' #5817

Closed
ImBIOS opened this issue Aug 27, 2023 · 1 comment · Fixed by #5826
Closed

[turborepo] Parsing error: Cannot find module 'next/babel' #5817

ImBIOS opened this issue Aug 27, 2023 · 1 comment · Fixed by #5826
Assignees
Labels
kind: bug Something isn't working

Comments

@ImBIOS
Copy link
Contributor

ImBIOS commented Aug 27, 2023

What version of Turborepo are you using?

1.10.13

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Describe the Bug

Description

ESLint error: Parsing error: Cannot find module 'next/babel'

Environment


  System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M2
    Memory: 44.83 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - ~/Library/Caches/fnm_multishells/45503_1693117081546/bin/node
    npm: 9.6.7 - ~/Library/Caches/fnm_multishells/45503_1693117081546/bin/npm
    pnpm: 8.6.12 - ~/Library/pnpm/pnpm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    eslint: ^8.47.0 => 8.47.0 
    prettier: ^3.0.2 => 3.0.2 
    tsconfig: workspace:* => 0.0.0 
    turbo: latest => 1.10.13 


Expected Behavior

ESLint should work properly without babel resolution error

To Reproduce

  1. Run pnpm create turbo and use pnpm.
  2. Open apps/web/next.config.js, wait a second and the module has a red underline error.

Reproduction Repo

pnpm create turbo

Additional Info

Related with:

@ImBIOS ImBIOS added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Aug 27, 2023
@tknickman tknickman self-assigned this Aug 28, 2023
@tknickman tknickman removed the needs: triage New issues get this label. Remove it after triage label Aug 28, 2023
@tknickman
Copy link
Member

Thanks for the report! This is a vscode issue, you can fix it by adding:

{
  "eslint.workingDirectories": [{ "mode": "auto" }]
}

to your .vscode/settings.json.

I wanted to avoid shipping an IDE specific config with our examples, but it's a common enough issue that we should likely add it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants