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:

相关推荐
爱尔兰极光几秒前
计算机网络--网络层
运维·服务器·计算机网络
Neolnfra7 分钟前
Xshell SSH 连接故障排查
运维·服务器·网络·ssh·xshell·运程连接
极地星光13 分钟前
Ubuntu 16.10 启动时 networking.service 缓慢问题
linux·ubuntu
Roadinforest13 分钟前
如何使用 keyd 定制 Caps Lock:拯救你坏掉的 Left Control 键(Linux-Ubuntu)
linux·ubuntu
MonkeyKing_sunyuhua16 分钟前
ubuntu22.04安装nginx
运维·windows·nginx
舞动青春8822 分钟前
Ubuntu安装QEMU过程及问题记录
linux·学习·ubuntu
知识分享小能手27 分钟前
Ubuntu入门学习教程,从入门到精通,Ubuntu 22.04的基本配置 (3)
linux·学习·ubuntu
Joren的学习记录42 分钟前
【Linux运维大神系列】Docker详解(二)
linux·运维·docker
Crkylin1 小时前
尚硅谷Linux应用层学习笔记(一)GCC编译
linux·笔记·学习
Fortune_yangyang1 小时前
Docker 入门指南:从 “容器小白” 到快速上手
运维·docker·容器