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:

相关推荐
Cincoze-Johnny13 小时前
Linux系统-应用问题全面剖析Ⅳ:德承工控机MD-3000在Ubuntu操作系统下[TPM功能]设置教程
linux·运维·ubuntu
默|笙13 小时前
【Linux】进程(1)
linux·运维·服务器
某林21213 小时前
基于ROS2与EKF的四轮差速机器人里程计精度优化:解决建图漂移与重影问题
linux·stm32·嵌入式硬件·slam·智能小车
dragoooon3413 小时前
[Linux网络基础——Lesson7.「传输层协议 UDP 与 TCP」]
linux·网络·udp
wanhengidc14 小时前
云手机的不足之处有哪些?
运维·服务器·科技·智能手机·云计算
红袜子i14 小时前
解决 Ubuntu 中 apt-get update 因架构配置混乱导致的更新失败问题
linux·ubuntu·架构
Xの哲學14 小时前
Linux 分段卸载技术深度剖析
linux·服务器·网络·架构·边缘计算
Charles Shan14 小时前
Mac上的linux虚拟机踩坑日记
linux·macos
绝顶少年14 小时前
阿里云服务器磁盘空间扩展实战:从39GB到200GB无损扩容指南
服务器·阿里云·云计算
zengshitang52014 小时前
ACRN 实战应用:在一台电脑上同时安装Windows10、Ubuntu22.04、Ubuntu PREEMPT_RT实时系统并流畅运行
linux·运维·ubuntu