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:

相关推荐
Aurora(^*_*^)几秒前
docker 部署openclaw踩坑记录
运维·docker·容器
wanhengidc10 分钟前
服务器托管对企业的作用
大数据·运维·服务器·分布式·智能手机
基于底层的菜鸟14 分钟前
VsCode GitHub Copilot Chat 节省request
服务器·copilot·ai编程
Yupureki31 分钟前
《Linux系统编程》15.进程间通信-管道
linux·运维·服务器·c语言·c++
Yupureki35 分钟前
《Linux系统编程》14.库的制作与原理
linux·运维·服务器·c语言·开发语言·c++
正点原子39 分钟前
瑞芯微工业级芯加持,正点原子RK3562J开发板/核心板解锁嵌入式开发新可能!
linux·ubuntu·嵌入式
路溪非溪44 分钟前
Linux下wifi子系统的数据流
linux·arm开发·驱动开发
feng68_44 分钟前
MySQL集群主从复制
linux·运维·数据库·mysql·adb
QWQ___qwq1 小时前
AutoDL服务器NLTK语料包下载失败(卡死/404)完美解决方案
运维·服务器
志栋智能1 小时前
预算有限?超自动化安全运维的普惠解决方案
运维·网络·人工智能·安全·自动化