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:

相关推荐
今天只学一颗糖4 分钟前
Linux学习笔记--insmod 命令
linux·笔记·学习
摩羯座-1856903059441 分钟前
爬坑 10 年!京东店铺全量商品接口实战开发:从分页优化、SKU 关联到数据完整性闭环
linux·网络·数据库·windows·爬虫·python
irisart1 小时前
4.1 > Linux 文件/目录权限管理【理论】
linux
---学无止境---2 小时前
Linux中poll的实现
linux
利刃大大2 小时前
【高并发服务器】三、正则表达式的使用
服务器·c++·正则表达式·项目
芝士小宇2 小时前
tcp 服务器的设计思路
服务器·网络·tcp/ip
wu~9702 小时前
web服务器有哪些?服务器和web服务器有什么区别
运维·服务器·前端
₯㎕星空&繁华2 小时前
阿里云服务器安装MySQL服务器
服务器·ubuntu·阿里云·云计算
爱倒腾的老唐2 小时前
13、Linux 基本权限
linux·运维·服务器
罗政3 小时前
CentOS 7.6 系统源码部署 HivisionIDPhotos
linux·运维·centos