본문 바로가기

WEB개발/REACT

[React] Next, Typescript... 오류모음

 

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"]
}

 

'WEB개발 > REACT' 카테고리의 다른 글

[React] web성능 메트릭  (0) 2023.12.18
[React] Typescript  (1) 2023.12.18
[React] ServerComponent, HTML Streaming  (0) 2023.12.11
[Next.js] Tailwind CSS, ESLint, Webpack  (0) 2023.12.11
[React] Next.js  (0) 2023.12.05