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:

相关推荐
Mr_Dwj38 分钟前
【运维】Docker 入门
运维·docker·云原生·容器
lqqjuly40 分钟前
Lidar调试记录Ⅰ之Ubuntu22.04虚拟机安装ROS2(无坑版)
linux·ros2·lidar·ubuntu22.04
奋斗的蛋黄43 分钟前
CI/CD 全流程指南:从概念到落地的持续交付实践
运维·ci/cd·kubernetes
wanhengidc1 小时前
云手机是真实手机吗
运维·服务器·游戏·智能手机·云计算
wanhengidc1 小时前
云手机 服务器网络安全
运维·服务器·安全·web安全·智能手机·云计算
I · T · LUCKYBOOM1 小时前
构建软RAID磁盘阵列
linux·运维·服务器
IT小白农民工1 小时前
安装SAP Business one for HANA之前的准备
linux·经验分享·sap
小虾爬滑丫爬2 小时前
.net8发布Linux 版本程序,部署到Linux服务器上
linux·.net8·打包部署
l1l2x1x22 小时前
DNS配置作业
运维·服务器
阿巴~阿巴~2 小时前
UDP网络编程:从客户端封装到服务端绑定的深度实践
linux·网络·socket网络编程·sendto函数·ip绑定·udp网络编程