Next.js Discord

Discord Forum

Getting constant type errors why?

Unanswered
White-winged Tern posted this in #help-forum
Open in Discord
White-winged TernOP
I'm currently using "next": "16.1.1", "nodemailer": "^7.0.12","react-icons": "^5.5.0", and

"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.1.1",
"tailwindcss": "^4",
"tw-animate-css": "^1.4.0",
"typescript": "^5"
}
I'm getting types errors all over the project, I tried install the type as dev dependencies for example pnpm --save-dev @types/nodemailers the return is Command "@types/nodemailer" not found and is the same for react icons library, same thing happens with others libraries like next-intl and next-international

Help

8 Replies

Haddock
That's because many libraries are not fully compatible with React 19 and next 16 yet.
White-winged TernOP
Oh, I understand that, but what can I do then? Go back to a stable version 15?
Haddock
Yeah, that's the most recommended way.
White-winged TernOP
And thanks for the answer @Haddock
Haddock
I think you should try next 14, and react 18.
White-winged TernOP
I have one like that and since the vulnerability on next stable version of it, there's a dependecy that jumps to next 16 so there's also problems on that
But I have another next version 15 and works great
Thank you, I'll stay with 15 then for now! You brought clarity to my day, seriously!