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:

相关推荐
程序员 _孜然5 小时前
Ubuntu/Debian修改网卡名字enP3p49s0为eth0
linux·运维·驱动开发·嵌入式硬件·ubuntu·debian
IDIOT___IDIOT5 小时前
Linux mount 命令
linux·运维·服务器
暗流者5 小时前
AAA 服务器与 RADIUS 协议笔记
运维·服务器·笔记
锐策5 小时前
Git checkout 与 Git reset 核心区别解析(分支与版本关联逻辑)
运维·git
CTRA王大大6 小时前
【golang】制作linux环境+golang的Dockerfile | 如何下载golang镜像源
linux·开发语言·docker·golang
小张程序人生6 小时前
《VMware 安装 CentOS 7.9 虚拟机详细教程(含图解步骤)》
linux·centos
青草地溪水旁8 小时前
服务发现实例和服务实例是不同的
服务器·服务发现·服务实例
泡沫冰@8 小时前
管理 SELinux 安全性
linux
于冬恋9 小时前
RabbitMQ高级
服务器·网络·rabbitmq
展信佳_daydayup10 小时前
03 基础篇-润和开发板连接过程
linux·开源·嵌入式