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:

相关推荐
EMTime7 小时前
Docker运行OpenWRT
运维·docker·容器
lolo大魔王7 小时前
Linux 文件系统超全面详解(原理、结构、挂载、分区、inode、日志、管理命令)
linux·运维·服务器
磊 子9 小时前
详细讲解一下epoll
linux·io·epoll·io多路复用
printfLILEI9 小时前
php中的类与对象以及反序列化
linux·开发语言·php
zyl8372110 小时前
Docker 使用手册
运维·docker·容器
古月方枘Fry10 小时前
MGRE实验
运维·服务器
博客-小覃10 小时前
Zabbix之华为交换机的日志记录信息操作详细教程
服务器·网络·华为·zabbix
叠叠乐11 小时前
redmi k90 pro max 强解BL,刷海外rom, 并刷入sukisu ultra
linux
stolentime11 小时前
FreeDomain 本地开发环境快速搭建指南
运维·服务器·网络
向量引擎11 小时前
从零起步,如何打造专属向量引擎 API 中转工作流?
java·服务器·前端