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:

相关推荐
qyhua27 分钟前
【Linux运维实战】彻底修复 CVE-2011-5094 漏洞
linux·运维·安全
坠金34 分钟前
linux/centos迁移conda文件夹
linux·centos·conda
Andya_net1 小时前
网络安全 | 深入了解 X.509 证书及其应用
服务器·安全·web安全
纳于大麓2 小时前
Kotlin基础语法
linux·windows·kotlin
九皇叔叔2 小时前
Linux Shell 正则表达式中的 POSIX 字符集:用法与实战
linux·运维·正则表达式
東雪蓮☆2 小时前
K8s 平滑升级
linux·运维·云原生·kubernetes
AKAMAI2 小时前
数据孤岛破局之战 :跨业务分析的难题攻坚
运维·人工智能·云计算
东巴图3 小时前
JavaScript性能优化实战大纲性能优化的核心目标
运维·matlab
---学无止境---3 小时前
Linux中进程创建和缓存对象初始化fork_init、proc_caches_init和buffer_init
linux
站长朋友3 小时前
【邀请函】锐成信息 × Sectigo | CLM - SSL 证书自动化运维解决方案发布会
运维·自动化·ssl·clm·sectigo·47天ssl证书