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:

相关推荐
赖small强1 分钟前
【Linux C/C++开发】第16章:多线程编程基础
linux·c语言·c++·多线程编程·进程和线程的本质区别
haofafa3 分钟前
Docker极简入门实战大纲
运维·docker·容器
朕要睡了4 分钟前
aws-sdk-cpp编译
linux·运维·服务器
q***318311 分钟前
Nginx搭建负载均衡
运维·nginx·负载均衡
刘国华-平价IT运维课堂32 分钟前
红帽企业Linux 10.1发布:AI命令行助手、量子安全加密和混合云创新
linux·运维·服务器·人工智能·云计算
qq_4798754334 分钟前
bash Buffering
linux
孪生质数-40 分钟前
Ansible基础入门
服务器·自动化·ansible·openstack
生活爱好者!1 小时前
效率高!开源协作 Wiki 与文档管理平台 NAS一键部署docmost
运维·网络·docker·容器·开源
间彧1 小时前
tail 、journalctl 、 docker logs -f命令详解
linux
西西学代码2 小时前
Flutter---Listview横向滚动列表(2)
linux·运维·flutter