Closed gdholly closed 1 month ago
Please provide a proper reproduction - we have an optional peer dependency on @typescript-eslint/eslint-plugin
so its not being pulled in or configured by us
It's the utils in the stacktrace tho, not the eslint plugin. Not sure why that is hoisted 🤔 We'd need a full reproduction like Gareth mentions to properly investigate 👍
Thanks for taking a look so quickly guys, here is the full stack trace.
eslint src
Oops! Something went wrong! :(
ESLint: 7.32.0
Error: Failed to load plugin 'jest' declared in '.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk' Require stack:
Can you provide a separate repository with a minimal reproduction? Just remove everything you can while still getting the same error. I'm guessing this is a hoisting bug in a package manager, but cannot say without a full project.
Looks like this is caused by some other packages having a dependency to eslint 8.0+ which npm can't seem to detect. Thanks for your help.
@gdholly What did you do to fix this? Did you identify the packages? I'm having the same issue after this minor upgrade.
In our case I think there was a defect in npm that was hiding the true issue. We have set it aside until we upgrade eslint. Try to do what @SimenB suggested and build a repo from scratch with just your package.json and your eslint config file, there might be another package that is pulling in eslint 8+.
Thanks for getting back to me! Our issue turned out to be that we were still on eslint@6
, and upgrading to 8.x
resolved it.
When running with eslint 7 we get the following:
Oops! Something went wrong! :(
ESLint: 7.32.0
Error: Failed to load plugin 'jest' declared in '.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk' Require stack: