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:

相关推荐
TH_114 分钟前
腾讯云-(1)-轻量级服务器购买
服务器·云计算·腾讯云
袖手蹲25 分钟前
树莓派 5 Trixie 镜像 + Docker 架设 Eclipse Mosquitto 与 ESP32 双向 MQTT 交互
运维·docker·容器
盛世隐者42 分钟前
【Linux】好用的命令记录
linux
山卡拉噶1 小时前
在Linux中安装Kdump调试环境
linux·运维·服务器
闲猿类1 小时前
嵌入式第九天学习
linux·c语言·学习·算法·嵌入式
℡終嚸♂6801 小时前
红帽系统(RHEL 8/9)安装与配置Nginx全攻略
运维·chrome·nginx
TT哇1 小时前
【计算机网络】经典易错题 1.概述 2 物理层 3.数据链路层 4.网络层
android·服务器·计算机网络
CS_浮鱼1 小时前
【Linux】UDP
linux·udp
大侠课堂2 小时前
ARM Linux内核异常排查指南
linux·arm开发
DeeplyMind2 小时前
Linux Virtio 子系统核心数据结构解析
linux·驱动开发·virtio-gpu