보조기억장치

tailwind css Module not found 본문

React

tailwind css Module not found

캐세이 2023. 5. 6. 16:55

import "@styles/globals.css"; 아래와 같이 에러 발생

 

./app/layout.jsx:1:0
Module not found: Can't resolve '@styles/globals.css'
> 1 | import "@styles/globals.css";

 

(해결방법)

jsconfig.json 수정 (@ 옆 /를 제거하고 저장)

 

변경전

{
  "compilerOptions": {
    "paths": {
      "@/*": ["./*"]
    }
  }
}

변경 후

{
  "compilerOptions": {
    "paths": {
      "@*": ["./*"]
    }
  }
}

'React' 카테고리의 다른 글

NextJS 13.4 Server Actions 사용  (0) 2023.05.14
Prisma 설치  (0) 2023.05.12
Next.js 13.4  (0) 2023.05.06
Next.js Error [TypeError]: Cannot read properties of undefined (reading 'map')  (0) 2023.05.04
Install tailwindcss with Next.js  (0) 2023.05.03