这是indexloc提供的服务,不要输入任何密码
Skip to content

ESLint cannot find next/babel when using pnpm #1600

@ChristianIvicevic

Description

@ChristianIvicevic

What version of Turborepo are you using?

1.4.0

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

pnpm

What operating system are you using?

Mac

Describe the Bug

After checking out the repository and opening the with-pnpm example and running pnpm install I noticed that ESLint is having issues in the editor. It claims that there is no module next/babel and this error is displayed both in WebStorm and VSCode. My gut feeling is that next/babel is usually referenced as a transitive peer dependency which doesn't work well with the strict nature of pnpm.

image

The error appears only when opening the root .eslintrc.js and the index.js in the eslint-config-custom package. Linting generally works and running pnpm lint works as well, it is just really annoying seeing errors when editing either of the files. Opening the basic example or a repository scaffolded with create-turbo and using npm instead of pnpm does not have this particular issue.

Expected Behavior

No ESLint errors in any configuration file.

To Reproduce

Open the with-pnpm example in WebStorm or VSCode with enabled ESLint plugins and install dependencies using pnpm. I could reproduce this with v6.32.25 and v7.7.0 of pnpm both installed with corepack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: examplesImprovements or additions to examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions