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:

相关推荐
青梅橘子皮6 小时前
Linux---基本指令
linux·运维·服务器
REDcker7 小时前
Linux信号机制详解 POSIX语义与内核要点 sigaction与备用栈实践
linux·运维·php
cui_ruicheng8 小时前
Linux进程间通信(三):System V IPC与共享内存
linux·运维·服务器
蚰蜒螟8 小时前
深入 Linux 内核同步机制:从 futex 到 spinlock 的完整旅程
linux·windows·microsoft
运维全栈笔记8 小时前
Linux安装配置Tomcat保姆级教程:从部署到性能调优
linux·服务器·中间件·tomcat·apache·web
dllmayday9 小时前
Linux 上用终端连接 WiFi
linux·服务器·windows
ACP广源盛139246256739 小时前
IX8024与科学大模型的碰撞@ACP#筑牢科研 AI 算力高速枢纽分享
运维·服务器·网络·数据库·人工智能·嵌入式硬件·电脑
峥无11 小时前
Linux系统编程基石:静态库·动态库·ELF文件·进程地址空间全景图
linux·运维·服务器
用户23678298016811 小时前
从 chmod 755 说起:Unix 文件权限到底是怎么算的?
linux
码云数智-大飞11 小时前
本地部署大模型:隐私安全与多元优势一站式解读
运维·网络·人工智能