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:

相关推荐
西***634712 分钟前
全兼容・高安全:KVM 一站式服务器远程监控与管理指南
服务器
-dcr16 分钟前
49.python自动化
运维·python·自动化
萧曵 丶1 小时前
Linux 业务场景常用命令详解
linux·运维·服务器
豆是浪个2 小时前
Linux(Centos 7.6)命令详解:ps
linux·windows·centos
乾元2 小时前
ISP 级别的异常洪泛检测与防护——大流量事件的 AI 自动识别与响应工程
运维·网络·人工智能·安全·web安全·架构
Run_Teenage2 小时前
Linux:深刻理解缓冲区
linux
youxiao_903 小时前
kubernetes 概念与安装(一)
linux·运维·服务器
凡梦千华3 小时前
logrotate日志切割
linux·运维·服务器
wdfk_prog3 小时前
[Linux]学习笔记系列 -- [fs][proc]
linux·笔记·学习
ELI_He9993 小时前
Airflow docker 部署
运维·docker·容器