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:

相关推荐
nvd111 分钟前
通过 Gmail API 发送邮件的完整指南
服务器·网络
深圳市恒讯科技3 分钟前
防止服务器被黑:终极防范网络攻击指南
运维·服务器·网络安全
VicdorLin4 分钟前
docker报错: client version 1.24 is too old. Minimum supported API version is 1.44
运维·docker·容器
橘颂TA5 分钟前
【Linux】从 “抢资源” 到 “优雅控场”:Linux 互斥锁的原理与 C++ RAII 封装实战(Ⅰ)
linux·运维·服务器·c++·算法
RisunJan6 分钟前
Linux命令-init命令(管理运行级别和控制系统状态)
linux·运维·服务器
ayaya_mana6 分钟前
Chrony:通用-替换国内 NTP 源进行时间同步
linux·运维·服务器·chrony
深耕半夜7 分钟前
debug函数
linux·运维·服务器
一叶星殇10 分钟前
ASP.NET Core 后端如何通过 Nginx 获取真实客户端 IP 完整指南
服务器·tcp/ip·nginx
赵民勇10 分钟前
Qt项目缺少Quick模块错误解决方案
linux·qt
爱吃大芒果14 分钟前
openJiuwen在Ubuntu上的安装教程
linux·运维·ubuntu