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:

相关推荐
可莉丝婷16 分钟前
光模块产线自动化设备品牌推荐:艾利特选型指南
运维·自动化
型者无疆1 小时前
关于Fcitx5在ubuntu26.04中的位置问题
运维·服务器
yunwei371 小时前
eBPF 教程:用 BPF Qdisc 实现出口限速
linux·云原生·开源
mengge.cloud1 小时前
Linux三剑客 grep sed awk 小白基础教程
linux·运维·服务器·网络
盐焗鹌鹑蛋1 小时前
【Linux】进程间通信与进程池
linux
无毁的湖光-Al2 小时前
解Bug之路-with AI-应用被限流?
java·linux
Brilliantwxx2 小时前
【Linux】 进程(4)七大进程状态深度解析
linux·运维·算法
HiDev_2 小时前
【非标自动化】2、认识元器件(气源处理组件)
运维·自动化
HiDev_2 小时前
【非标自动化】2、认识元器件(远程I/O)
运维·自动化
国际云,接待2 小时前
df 显示磁盘还有空间却无法写文件:Linux inode 耗尽排查与治理
linux·运维·服务器