Next is complaining that @types/react is not installed
Unanswered
Sokoke posted this in #help-forum
SokokeOP
Pretty much the title. Whenever I try to run
I have added a screenshot below for reference.
The dependency versions for reference:
These are not the complete list of dependencies (obviously). However, I feel that these are the ones that could be causing the issue. Any help on this would be appreciated! 🙂
Thanks in advance.
next dev , this is the error that's coming up. I have added a screenshot below for reference.
The dependency versions for reference:
{
"dependencies": {
"next": "11.1.4",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15"
}These are not the complete list of dependencies (obviously). However, I feel that these are the ones that could be causing the issue. Any help on this would be appreciated! 🙂
Thanks in advance.
3 Replies
SokokeOP
{
"compilerOptions": {
"target": "es6",
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": ".",
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsxImportSource": "@emotion/react"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}My
tsconfig.json for reference â˜ðŸ½