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:

相关推荐
机智的土拨鼠1 小时前
解决本地操作云服务器上的Redis
java·linux·服务器·windows·redis·ubuntu
国中之林3 小时前
【qt】TCP的监听 (设置服务器IP地址和端口号)
服务器·qt·学习·tcp/ip·php
码农鑫哥的日常3 小时前
DHCP与TCP的简单解析
服务器·网络·tcp/ip
2301_784912693 小时前
关于美国服务器IP的几个常见问题
服务器
中云DDoS CC防护蔡蔡3 小时前
SDK游戏盾、高防IP和高防CDN有什么区别
运维·服务器·tcp/ip·http·ddos
辣香牛肉面4 小时前
Redis 运维面试题
运维·数据库·redis
全栈工程师修炼指南4 小时前
机器学习筑基篇,Ubuntu 24.04 编译安装 Python 及多版本切换
linux·人工智能·python·ubuntu·机器学习
苦学嵌入式5 小时前
imx6ull/linux应用编程学习(14) MQTT基础知识
linux·运维·学习
fpcc6 小时前
c++应用网络编程之二网络的IO模型
服务器·网络·c++
要命30007 小时前
keepalive+nginx/haproxy实现转发
运维·nginx