fix(PBI-58): pin turbopack root to cwd so worktrees resolve own node_modules
Multi-lockfile setups (e.g. running dev/build from inside a git worktree under .claude/worktrees/) caused Next.js to climb up to the parent repo's package-lock.json and resolve modules from the parent's node_modules, which doesn't have the new manual-rendering deps installed. Pinning turbopack.root to process.cwd() keeps each invocation scoped to the directory it was launched from. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a790f830f
commit
bdd0398eb6
1 changed files with 5 additions and 0 deletions
|
|
@ -5,6 +5,11 @@ import pkg from "./package.json"
|
|||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
serverExternalPackages: ['sharp'],
|
||||
// Pin Turbopack workspace root to the invocation directory so worktrees
|
||||
// resolve their own node_modules instead of climbing into an outer lockfile.
|
||||
turbopack: {
|
||||
root: process.cwd(),
|
||||
},
|
||||
env: {
|
||||
NEXT_PUBLIC_APP_VERSION: pkg.version,
|
||||
NEXT_PUBLIC_BUILD_DATE: new Date().toISOString(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue