-
Notifications
You must be signed in to change notification settings - Fork 643
Unable to deploy next-forge on vercel from connected github repo #736
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I followed the exact instructions in https://www.next-forge.com/docs/deployment/vercel with a fresh install. Consistently getting this failure.
It seems that during compilation next.js resolves the workspace import @repo/feature-flags/lib/toolbar to the relative path ../../packages/feature-flags/lib/toolbar. But in the compiled JS, Node can't find the module.
This only happens when I deploy from a connected github repo. When deploying from vercel cli, the problem does not occur.
next-forge version
I am using version 6.0.1
Build error log
+ @clack/prompts@1.1.0
+ commander@14.0.3
+ nypm@0.6.5
3927 packages installed [24.82s]
Detected Next.js version: 16.1.6
Running "bun run build"
$ next build
⨯ Failed to load next.config.ts, see more info here https://nextjs.org/docs/messages/next-config-error
> Build error occurred
Error: Cannot find module '../../packages/feature-flags/lib/toolbar'
Require stack:
- /vercel/path0/root/next-forge/apps/app/next.config.compiled.js
- /vercel/path0/root/next-forge/node_modules/.bun/next@16.1.6+4c1edb5b51263512/node_modules/next/dist/build/next-config-ts/transpile-config.js
- /vercel/path0/root/next-forge/node_modules/.bun/next@16.1.6+4c1edb5b51263512/node_modules/next/dist/server/config.js
- /vercel/path0/root/next-forge/node_modules/.bun/next@16.1.6+4c1edb5b51263512/node_modules/next/dist/cli/next-test.js
- /vercel/path0/root/next-forge/node_modules/.bun/next@16.1.6+4c1edb5b51263512/node_modules/next/dist/bin/next
at ignore-listed frames {
code: 'MODULE_NOT_FOUND',
requireStack: [Array]
}
error: script "build" exited with code 1
Error: Command "bun run build" exited with 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working