WEB개발/REACT
[React] Next, Typescript... 오류모음
wooyeon06
2024. 1. 26. 16:08
1. EPERM: operation not permitted, rename
> npm cache clean --force > 관리자권한 재실행
2. Error: Cannot find module 'prettier' from
> npm install --save-dev prettier
3. 모듈 못찾을 경우Cannot find module 'next/dist/lib/metadata/types/metadata-interface.js' or its corresponding type declarations
next버전 최신화, 캐시삭제
yarn add next@latest
pnpm store prune
or
"moduleResolution": "node",
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"downlevelIteration": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*", "./public/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "../../out/types/**/*.ts"],
"exclude": ["node_modules"]
}