Today I Learned/in dev
[vite] tailwindcss v4.1 설치 오류 | Type 'Plugin<any>[]' is not assignable to type 'PluginOption'
떼굴펜
2025. 4. 16. 10:57
문제 상황
테스트 페이지가 필요해서 셋팅하던 중, 테일윈드 공식 문서 대로 제일 최신 버전을 설치하니
vite.config.ts 파일에서 아래와 같은 오류가 발생했다.
Type 'Plugin<any>[]' is not assignable to type 'PluginOption'
해결책
: node_modules 폴더와 lock 파일(ex. pnpm-lock.yaml, package.lock.json, yarn.lock)을 둘다 삭제하고 다시 install 받으면 해결된다.
rm -rf node_modules pnpm-lock.yaml
pnpm install
출처: https://github.com/tailwindlabs/tailwindcss/discussions/17541