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:

相关推荐
外滩运维专家32 分钟前
Nginx 上的通配符证书 90 天到期,续签这事我是这么搞的
运维
科技新资讯1 小时前
国内AI影视制作服务商哪家口碑好
运维·人工智能·devops
jufeng13071 小时前
【系列:MiniKV 原理剖析 · 第 6 篇】
linux·软件工程·个人开发·makefile
IT摆渡者2 小时前
ubuntu系统网络问题
linux·运维·ubuntu
jufeng13072 小时前
【系列:MiniKV 原理剖析 · 第 5 篇】
linux·网络·c++·软件工程
kdxiaojie2 小时前
Linux 驱动研究 —— SDIO (1)
linux·运维·笔记·学习·sdio
ZzzZZzzzZZZzzzz…3 小时前
K8S实战:NFS+StorageClass+PV/PVC+Deployment
运维·云原生·容器·kubernetes·storageclass·linux运维·持久卷
jufeng13073 小时前
【系列:MiniKV 原理剖析 · 第 8 篇(完结篇)】
linux·c++·log4j·软件工程·makefile
BerrySen1783 小时前
一个 JDBC 参数引发的架构演进:Apache SeaTunnel 如何解决数据同步中的“定时 Flush”难题
运维·自动化·zabbix