Error - about prisma developon Vercel

prisma vercel error

answer in the website [Document]

https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/vercel-caching-issue

bash 复制代码
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

Solution1:

Within the scripts section of your project's package.json file, if there is not already a script named postinstall, add one and add prisma generate to that script:

复制代码
{  ...  "scripts" {    "postinstall": "prisma generate"  }  ...}

The application's build script in package.json

Within the scripts section of your project's package.json file, within the build script, prepend prisma generate to the default vercel build command:

复制代码
{  ...  "scripts" {    "build": "prisma generate && <actual-build-command>"  }  ...}

vercel

add

Vercel UI's build script field

Another way to configure prisma generate to be run on every deployment is to add the command to the build settings via Vercel's UI.

Within your project's dashboard, go to the Settings tab and find the General section. In that section you will find a box labeled Build & Development Settings that contains an input field named Build Command:

Within that field, prepend prisma generate to the existing script:

相关推荐
阿桂有点桂15 小时前
Docker搭建Ngnix、php5.6、php8、postgresql、redis
运维·服务器·docker·容器
WAsbry15 小时前
InputConnection机制与跨进程文本操作的工程实践
android·linux
wdfk_prog15 小时前
[Linux]学习笔记系列 -- [kernel]cpu
linux·笔记·学习
WAsbry15 小时前
从一个Bug看Android文本编辑的设计缺陷
android·linux
snakecy15 小时前
Docker打包步骤
运维·docker·容器
妮妮喔妮15 小时前
root@lll:/data# sudo docker compose up -d 输入这个命令 控制台一直没有任何的反应 我需要如何排查呢?
运维·docker·容器·wsl docker
java资料站15 小时前
Docker 部署onlyoffice
运维·docker·容器
大聪明-PLUS15 小时前
Linux 中 timeout、watch 和 at 的指南:管理命令执行时间
linux·嵌入式·arm·smarc
想唱rap16 小时前
Linux开发工具(4)
linux·运维·服务器·开发语言·算法
weixin_5377658017 小时前
【Nginx优化】性能调优与安全配置
运维·nginx·安全