티스토리 뷰

반응형

Vercel로 배포시 나오는 에러메시지로 다음과 같이 나오는경우 의 해결방법을 소개합니다 !

 

Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the `prisma generate` command during the build process. Learn how: https://pris.ly/d/vercel-build PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the `prisma generate` command during the build process.

 

이말인 즉,

Vercel은 종속성을 캐싱하기 때문에 빌드 프로세스 중에 prisma generate 명령을 실행하는 것이 중요하다는 내용

 

해결방법은 간단했다. 

 

"scripts": {
    ...
    "build": "prisma generate && next build",
    ...
  },

 

패키지.json파일안에 다음과같이 추가하면 

빌드타임시 prisma generate를 실행한후 배포 진행  - 해결

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함