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:

相关推荐
烟雨书信11 分钟前
Linux中MySQL的逻辑备份与恢复
linux·运维·mysql
wkj00123 分钟前
QuaggaJS 配置参数详解
java·linux·服务器·javascript·quaggajs
藥瓿亭1 小时前
K8S认证|CKS题库+答案| 5.日志审计
linux·运维·docker·云原生·容器·kubernetes·cka
coder_lorraine1 小时前
【Linux系列】Linux用户大揭秘:从“公寓住户”到“社区管理员”的奇幻之旅
linux
家庭云计算专家2 小时前
飞牛云一键设置动态域名+ipv6内网直通访问内网的ssh服务-家庭云计算专家
运维·云计算·ssh·nextcloud·ddns·动态域名解析
藥瓿锻2 小时前
2024 CKA题库+详尽解析| 15、备份还原Etcd
linux·运维·数据库·docker·容器·kubernetes·cka
bbsh20992 小时前
WebFuture:Ubuntu 系统上在线安装.NET Core 8 的步骤
linux·ubuntu·.netcore·webfuture
太阳之神aboluo2 小时前
压测软件-Jmeter
java·运维·jmeter
ZZZKKKRTSAE2 小时前
快速上手Linux全局搜索正则表达式(grep)
linux·服务器·正则表达式
有谁看见我的剑了?2 小时前
stress 服务器压力测试的工具学习
服务器·学习·压力测试