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
1 Answer
Reset to default 0following 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