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:

相关推荐
蛊明1 小时前
下载CentOS 10
linux·运维·centos
北京-宏哥1 小时前
Linux系统安装MySQL5.7(其他版本类似)避坑指南
linux·运维·服务器
Aphelios3801 小时前
Linux 下 VIM 编辑器学习记录:从基础到进阶(下)
java·linux·学习·编辑器·vim
qw9492 小时前
Linux 高级篇 日志管理、定制自己的Linux系统、备份与恢复
linux·运维·服务器
丶只有影子2 小时前
【Nacos】从零开始启动Nacos服务(windows/linux)
linux·运维·windows·微服务·springcloud
青年vs阳光2 小时前
win10把c盘docker虚拟硬盘映射迁移到别的磁盘
运维·docker·容器
-SGlow-2 小时前
Linux相关概念和易错知识点(30)(线程互斥、线程同步)
linux·运维·服务器
技术小齐3 小时前
网络运维学习笔记 021 HCIA-Datacom新增知识点02 SDN与NFV概述
运维·网络·学习
茂茂在长安3 小时前
Linux 命令大全完整版(11)
java·linux·运维·服务器·前端·centos
songbaoxian3 小时前
ElasticSearch
java·linux·elasticsearch