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:

相关推荐
君穆南4 小时前
基于 NFS 与 Rsync 实现跨服务器 Seafile 数据平滑迁移实战
linux·运维·git
bloglin999994 小时前
scp、rsync远程文件同步
linux·运维·服务器
迦南的迦 亚索的索4 小时前
LINUX环境
linux·运维·服务器
yuanjj884 小时前
linux下调试域格CLM920 NC5等9x07平台模块 QMI拨号
linux·运维·服务器
IMPYLH4 小时前
Linux 的 printenv 命令
linux·运维·服务器·bash
SilentSamsara4 小时前
SSH 远程管理:密钥登录 + 隧道转发,一次性配置好
linux·运维·服务器·ubuntu·centos·ssh
LN花开富贵4 小时前
【ROS】鱼香ROS2学习笔记一
linux·笔记·python·学习·嵌入式·ros·agv
疏星浅月5 小时前
数据对齐的底层原理与性能优化
linux
Jurio.5 小时前
本机开发 + 多机执行的极简远端运行工具
linux·git·python·github·远程工作
2501_945837435 小时前
OpenClaw:开启 “行动 AI“ 新纪元,从聊天机器人到自主智能体的范式革命
服务器