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:

相关推荐
笔记本note1 小时前
Linux 内存管理
linux·服务器·内存管理
郝学胜-神的一滴1 小时前
Effective STL 条款 14:用扩容函数避免重新分配
linux·开发语言·网络·数据结构·c++·单片机
GeW2 小时前
入行 Linux 与数据库运维:一条路径、三项习惯、一个考证观
linux·数据库
南子北游5 小时前
Linux 进程状态全景(上)
linux·运维·服务器
wdfk_prog5 小时前
Wi-Fi Direct 真机实践:JOIN 建链耗时优化
服务器·asp.net·php
yyzc111116 小时前
AI聚合支付搭配数字门店系统让实体店告别粗放经营
大数据·运维·人工智能
分布式存储与RustFS6 小时前
浏览器调 RustFS 的 S3 接口被拦下来?两个 CORS 变量分开管 9000 和 9001
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
吴建旭 智宅焕7 小时前
智能家居全国交付中兜底型基础设施的三大能力架构设计与实现
运维·智能家居·devops
AR-26710-7 小时前
docker Day6——容器数据卷
运维·docker·容器
lusklusklusk8 小时前
SQL Server Registered Servers 的核心功能:集中管理、分组执行与中央管理服务器(CMS)解析
运维·服务器