Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting a "DeprecationWarning: 'originalKeywordKind' deprecated" error when attempting to compile my project?

After compiling my project, I get the error pasted below, what does this mean and how can I fix it?

- info Linting and checking validity of types
DeprecationWarning: 'originalKeywordKind' has been deprecated since v5.0.0 and will no longer be usable after v5.2.0. Use 'identifierToKeywordKind(identifier)' instead.

while npm run build

I'm using nextjs 13.4 and my dependencies are as follows:

"dependencies": {
    "@prisma/client": "^5.0.0",
    "@types/bcryptjs": "^2.4.2",
    "@types/node": "^20.4.5",
    "@types/react": "^18.2.16",
    "@types/react-dom": "^18.2.7",
    "axios": "^1.4.0",
    "bcryptjs": "^2.4.3",
    "eslint": "^8.45.0",
    "eslint-config-next": "^13.4.12",
    "next": "^13.4.12",
    "next-auth": "^4.22.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-hook-form": "^7.45.2",
    "react-uuid": "^2.0.0",
    "typescript": "^5.1.6"
},
"devDependencies": {
    "@vercel/analytics": "^1.0.1",
    "autoprefixer": "^10.4.14",
    "postcss": "^8.4.27",
    "prettier-plugin-tailwindcss": "^0.4.1",
    "prisma": "^5.0.0",
    "tailwindcss": "^3.3.3"
}
like image 971
naeemgg Avatar asked Dec 08 '25 08:12

naeemgg


2 Answers

Just update @typescript-eslint/parser to latest (^6.6.0), it's an indirect dependency that was importing tsutils.

Also, these dependencies should be in devDependencies section:

"@types/bcryptjs": "^2.4.2",
"@types/node": "^20.4.5",
"@types/react": "^18.2.16",
"@types/react-dom": "^18.2.7",
"eslint": "^8.45.0",
"eslint-config-next": "^13.4.12",
"typescript": "^5.1.6"
like image 145
Leonardo Pinto Avatar answered Dec 09 '25 20:12

Leonardo Pinto


This refers to a change in Typescript: https://github.com/microsoft/TypeScript/blob/main/src/deprecatedCompat/5.0/identifierProperties.ts#L28

And something, probably one of your dependencies, haven't adapted to that change just yet, but it's only a deprecation warning, so no worries at the moment. 🙂

like image 33
MunchyYDL Avatar answered Dec 09 '25 22:12

MunchyYDL



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!