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:

相关推荐
拂拉氏35 分钟前
【知识讲解】 Linux环境变量的认识与使用
linux·环境变量
zhangrelay1 小时前
答疑-是否软件源问题都必须更换为国内呢-
linux·笔记·学习·ubuntu·ros2
zhangrelay1 小时前
《ROS 机器人程序设计》课程教学大纲-2026- kinetic-lyrical
linux·笔记·学习·ubuntu·机器人
KFCgrandpahhh1 小时前
rk3576点灯
linux·驱动开发
拂拉氏1 小时前
【知识讲解】 Linux进程认识及深度理解
linux·进程
海鸥811 小时前
AIOps(智能运维)理解
运维·人工智能
码农小韩2 小时前
Linux应用开发(一)——Linux的标准IO
linux·运维·服务器
路弥行至2 小时前
Linux (ARM64 / Jetson) 挂载 exFAT 移动硬盘排障与离线安装指南
linux·运维·服务器·经验分享·笔记·jetson·exfat
漫谈数据智理2 小时前
主动元数据为何是数据编织的核心——从“连接数据”走向“感知、理解与行动”的 Data Fabric
运维·fabric
数据库小学妹2 小时前
MySQL长事务复盘:Sleep连接、MDL排队与undo滞留
运维·数据库·mysql