pnpm lint erroring out with `Failed to loan config "next/typescript" to extend from` error.
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
I am following the next js dashboard tutorial. I added
I googled and found that it could be caused with older version of eslint, and I isntalled the latest version, however it still is throwing the same error when I run lint.
I am using Next 15 with node 20
Has anyone faced a similar issue?
next lint
command, and ran pnpm lint
after installing eslint, when I reran the pnpm lint
command, its throwing the following error:Failed to load config "next/typescript" to extend from.
Referenced from: /home/owstron/Code/nextjs-dashboard/.eslintrc.json
ELIFECYCLE Command failed with exit code 1.
I googled and found that it could be caused with older version of eslint, and I isntalled the latest version, however it still is throwing the same error when I run lint.
I am using Next 15 with node 20
Has anyone faced a similar issue?
23 Replies
Could you share your
eslintrc.json
you could try to install
eslint-config-next
if its not done automaticallyCape lionOP
This is my eslintrc.json file:
{
"extends": [
"next/core-web-vitals",
"next/typescript"
]
}
I guess, Next.js wasn't able to install the
eslint-config-next
package. Could you try to install it by yourself and test it again?Cape lionOP
My package-json shows that eslint-config-next has been installed:
"eslint": "^8",
"eslint-config-next": "14.2.5"
Could you try to run
pnpx next lint
are you using workspaces / monorepo in your current project
pnpm often creates symlinks, which next isn't always capable to find
could be symlink issue with pnpm in your node_modules folder
Cape lionOP
It looks like it tried to install next@14.2.5
I initially got this peer dependency warning when installing eslint-config-next
I initially got this peer dependency warning when installing eslint-config-next
Progress: resolved 457, reused 434, downloaded 0, added 0, done
WARN Issues with peer dependencies found
.
└─┬ next 15.0.0-canary.56
├── ✕ unmet peer react@19.0.0-rc.0: found 19.0.0-rc-f38c22b244-20240704
└── ✕ unmet peer react-dom@19.0.0-rc.0: found 19.0.0-rc-f38c22b244-20240704
I don't think I am using any workspaces/monorepo. I am just following the next-js-dashboard-tutorial. But yea it could be symlink issue.
so are you actually using next canary?
Cape lionOP
Yea, I think so.
"next": "15.0.0-canary.56",
"next-auth": "5.0.0-beta.19",
can you downgrade to next@latest
and test it again
I mean, pnpm has a strategy to handle peer-dependencies and their packages
but this can may result to build errors
Cape lionOP
it did not do it 😦
Hackberry nipple gall parasitoid
Did you find any solution ?
Asian black bear
I have the same issue
Red-bellied Woodpecker
I fixed it by following chatGPT xD
Update the
Run this in bash:
Then try running the
Update the
.eslintrc.json
with this:{
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"]
}
Run this in bash:
pnpm add -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-next
Then try running the
pnpm lint
command