Vercel Turborepo Deployment Errors (works locally)
Unanswered
Yellow Warbler posted this in #help-forum
Yellow WarblerOP
Vercel Deployment Options
(see image)
Turborepo output:
Error messages:
What I've tried:
Overriding
Building packages before running
(see image)
Turborepo output:
• Packages in scope: @repo/api, @repo/db, @repo/eslint-config, @repo/lib, @repo/tailwind-config, @repo/typescript-config, @repo/ui, marketing, web
• Running build in 9 packagesError messages:
web:build: ./app/api/trpc/[trpc]/route.ts
web:build: Module not found: Can't resolve '@repo/api'
web:build: ./app/(dashboard)/layout.tsx
web:build: Module not found: Can't resolve '@repo/db'What I've tried:
Overriding
root to and corresponding build/start commands and output dirBuilding packages before running
turbo build by having an extra npm script turbo run build --filter='./packages/*'12 Replies
@Yellow Warbler Vercel Deployment Options
(see image)
Turborepo output:
• Packages in scope: @repo/api, @repo/db, @repo/eslint-config, @repo/lib, @repo/tailwind-config, @repo/typescript-config, @repo/ui, marketing, web
• Running build in 9 packages
Error messages:
web:build: ./app/api/trpc/[trpc]/route.ts
web:build: Module not found: Can't resolve '@repo/api'
web:build: ./app/(dashboard)/layout.tsx
web:build: Module not found: Can't resolve '@repo/db'
What I've tried:
Overriding `root` to ` ` and corresponding `build`/`start` commands and `output` dir
Building packages before running `turbo build` by having an extra npm script `turbo run build --filter='./packages/*'`
turbo isn't ready yet for production. It's only ready for dev mode. Take a look here: https://areweturboyet.com/
Yellow WarblerOP
So is the alternative just
npm run build in apps/web?@Yellow Warbler So is the alternative just `npm run build` in `apps/web`?
yes, when you using
npm run-script dev to start your server you should be able to build your server like: npm run-script build to create the output folder and npm run-script start to start the serverYellow WarblerOP
im still getting the exact same errors
the
generate:dev script is for prisma@Yellow Warbler im still getting the exact same errors
try to run it locally. Do you get a .next folder?
Barbary Lion
also try redoploying with no "build cache" it works for me
@Yellow Warbler im still getting the exact same errors
Yacare Caiman
Do you want to generate the prisma client?
@B33fb0n3 try to run it locally. Do you get a .next folder?
Yellow WarblerOP
Yes but now I have a whole new error so I'm gonna make a new thread
@Barbary Lion also try redoploying with no "build cache" it works for me
Yellow WarblerOP
No dice
@Yacare Caiman Do you want to generate the prisma client?
Yellow WarblerOP
Yeah
@Yellow Warbler Yeah
Yacare Caiman
I should use this
"scripts": {
"dev": "prisma generate && next dev --turbopack",
"build": "prisma generate && prisma db push && next build",
"start": "next start",
"lint": "next lint"
},