最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - monorepo nx (nestjs & react) deploy on vercel - Stack Overflow

programmeradmin4浏览0评论

I have a problem with my NX monorepo. I can't deploy my nestjs api on vercel, while the front is well deployed.

I have either 404 errors or servless errors that I don't understand.... Because when I'm not in a monorepo, I can deploy...

This is my architecture :

├── .github/
├── .nx/
├── .vercel/
├── .vscode/
├── apps/
│   ├── backend/
│   ├── db/
│   ├── frontend/
├── dist/
│   ├── apps/
│   │   ├── backend/
│   │   ├── front/
├── node_modules/
├── .editorconfig
├── .env
├── .gitignore
├── .prettierignore
├── .prettierrc
├── compose.yaml
├── eslint.config.cjs
├── jest.config.ts
├── jest.preset.js
├── nx.json
├── package-lock.json
├── package.json
├── README.md
├── tsconfig.base.json
└── vercel.json

I tried changing my build folder, my vercel.json, putting another nest project in the monorepo.

I have a problem with my NX monorepo. I can't deploy my nestjs api on vercel, while the front is well deployed.

I have either 404 errors or servless errors that I don't understand.... Because when I'm not in a monorepo, I can deploy...

This is my architecture :

├── .github/
├── .nx/
├── .vercel/
├── .vscode/
├── apps/
│   ├── backend/
│   ├── db/
│   ├── frontend/
├── dist/
│   ├── apps/
│   │   ├── backend/
│   │   ├── front/
├── node_modules/
├── .editorconfig
├── .env
├── .gitignore
├── .prettierignore
├── .prettierrc
├── compose.yaml
├── eslint.config.cjs
├── jest.config.ts
├── jest.preset.js
├── nx.json
├── package-lock.json
├── package.json
├── README.md
├── tsconfig.base.json
└── vercel.json

I tried changing my build folder, my vercel.json, putting another nest project in the monorepo.

Share Improve this question asked Feb 16 at 17:30 LucanclLucancl 11 bronze badge New contributor Lucancl is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Feb 16 at 19:02
Add a comment  | 

1 Answer 1

Reset to default 0

following your issue and after a small search on Google please check this article from Vercel

https://vercel/docs/monorepos

Vercel explains exactly how to deploy the best 2 monorepo like NX and TrbueRepo

I tested it and it's working

发布评论

评论列表(0)

  1. 暂无评论