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:

相关推荐
GeW1 小时前
新质生产力路线图Linux、数据库、国产化替代一次讲透
linux
aningx3 小时前
cachyos 从 GRUB 切换到 rEFInd
linux
第404号工位5 小时前
40块钱二手瘦客户端,如何跑满家庭物联网中枢?(拒绝Docker爆盘实录)
linux·架构·node.js
对象存储与RustFS5 小时前
网盘限速逼你开会员?用 RustFS 自己搭一个不限速的“私人网盘
服务器·后端·docker
骑着蜗牛撵大象3276 小时前
Linux 进程间通信之管道:从 pipe() 的内核语义到 FIFO 落地排错
android·java·linux·系统编程·fifo·管道·进程间通信
众壹新能源科技7 小时前
逆变器自带无功不够用,加装5MVar SVG后功率因数从0.85回到0.99
运维·人工智能·自动化
..Dauntless..7 小时前
【Linux】一切皆文件和缓冲区
linux·运维·服务器
裕晟资质规划7 小时前
三类资质变更报告时限差在哪?军工 15 日、集成印制 10 日
大数据·服务器·网络
QMCY_jason7 小时前
x86 ubuntu2204 无gui 安装 openeuler 2203 aarch64版本
linux·运维·服务器
重生之小比特7 小时前
【Linux系统】12 进程程序替换 自定义Shell 命令行解释器
linux·运维·服务器