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:

相关推荐
lThE ANDE1 小时前
最完整版Linux安装Redis(保姆教程)
linux·运维·redis
yyuuuzz4 小时前
企业出海:技术部署与运维避坑
运维
郝亚军5 小时前
ubuntu通过samba,让win11可以访问其共享文件夹
linux·服务器·ubuntu
workflower5 小时前
人机交互部分OOD
运维·人工智能·自动化·集成测试·人机交互·软件需求
一个人旅程~5 小时前
旧电脑的“拯救者”?Linux Mint20.3是怎样适配软件硬件以及兼顾兼容与性能的平衡的?
linux·经验分享·电脑
农村小镇哥5 小时前
nginx服务器的介绍
运维·服务器·nginx
小夏子_riotous5 小时前
Docker学习路径——3、常用命令
linux·运维·服务器·学习·docker·容器·centos
其实防守也摸鱼6 小时前
无线网络安全---WLAN相关安全工具--kali(理论附题目)
linux·安全·web安全·学习笔记·kali·命令模式·wlan
uesowys8 小时前
CentOS Linux安装部署OpenClaw
linux·centos·安装部署openclaw
IMPYLH8 小时前
Linux 的 rm 命令
linux·运维·服务器·网络·bash