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
ESLint cannot find next/babel when using pnpm #1600
Comments
you can try configuring your eslint plugin to detect your workspaces under vscode settings.
i'm still trying to find out why this happens with pnpm in the first place or why this resolves it. |
Even though this proposal can also be applied to WebStorm there is an inherent incompatiblity with pnpm that's not fixed by this. For the time being I applied the pattern I used in the nx-version of my repo with declaring module.exports = {
root: true,
ignorePatterns: ['!**/*'],
extends: ['custom'],
}; |
Maybe this patch from Rush, could also improve things: |
Sadly I won't be able to test the suggested patch since I completely gave up on pnpm again. Every few months when I try it out there is still issues with packages not adhering to decent standards and thus being incompatible with pnpm. This time around it was prisma... but that is offtopic and another story. |
Try using |
I still look to be having this issue using VS Code 😬 |
This may be the same root cause as #1911 in that |
Any update on this issue? When I generate the default project using |
found out a hacky way to fix this
|
@Hamziss Didn't work for me 😞 |
@Hamziss Installing |
Merged, going to close for now, but please reopen if this issue comes up again! |
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 runningpnpm install
I noticed that ESLint is having issues in the editor. It claims that there is no modulenext/babel
and this error is displayed both in WebStorm and VSCode. My gut feeling is thatnext/babel
is usually referenced as a transitive peer dependency which doesn't work well with the strict nature of pnpm.The error appears only when opening the root
.eslintrc.js
and theindex.js
in theeslint-config-custom
package. Linting generally works and runningpnpm lint
works as well, it is just really annoying seeing errors when editing either of the files. Opening thebasic
example or a repository scaffolded withcreate-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 usingpnpm
. I could reproduce this with v6.32.25 and v7.7.0 of pnpm both installed with corepack.The text was updated successfully, but these errors were encountered: