Describe the bug
Running npx next-forge@latest init creates the project successfully, but the dependency installation step fails during npm install with an ERESOLVE unable to resolve dependency tree error.
The conflict appears to come from the @repo/payments workspace imported in apps/api, where zod@4.3.6 is installed, but openai@4.104.0 requires peerOptional zod@"^3.23.8". Because of this, the initialization process is canceled before dependencies are fully installed.
next-forge version
I am using version next-forge@6.0.2.
To Reproduce
Steps to reproduce the behavior:
- Open a terminal in a Windows environment.
- Run
npx next-forge@latest init
- Enter a project name, for example
some-app
- Let the scaffolding finish and wait for the dependency installation step
- See the
npm install failure with ERESOLVE unable to resolve dependency tree
Expected behavior
The project should initialize completely and install dependencies successfully without requiring manual intervention such as --legacy-peer-deps or forcing dependency resolution.
Screenshots
Not applicable. Terminal output below:
C:\Users\...\Dev>npx next-forge@latest init
┌ Let's start a next-forge project!
│
◇ What is your project named?
│ some-app
│
Creating a new Next.js app in C:\Users\...\Dev\some-app.
Downloading files from repo https://github.com/vercel/next-forge. This might take a moment.
Skipping git initialization.
Success! Created some-app at C:\Users\...\Dev\some-app
Inside that directory, you can run several commands:
npm run dev
Starts the development server.
npm run build
Builds the app for production.
npm start
Runs the built app in production mode.
We suggest that you begin by typing:
cd some-app
npm run dev
(node:16756) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
◒ Installing dependencies
■ `npm install` failed.
│ npm error code ERESOLVE
│ npm error ERESOLVE unable to resolve dependency tree
│ npm error
│ npm error While resolving: @repo/payments@0.0.0
│ npm error Found: zod@4.3.6
│ npm error node_modules/zod
│ npm error zod@"^4.3.6" from @repo/payments@0.0.0
│ npm error packages/payments
│ npm error @repo/payments@0.0.0
│ npm error node_modules/@repo/payments
│ npm error workspace packages\payments from the root project
│ npm error 1 more (api)
│ npm error peer zod@"^3.25.76 || ^4.1.8" from ai@5.0.166
│ npm error node_modules/ai
│ npm error peer ai@"^5.0.89" from @stripe/agent-toolkit@0.9.0
│ npm error node_modules/@stripe/agent-toolkit
│ npm error @stripe/agent-toolkit@"^0.9.0" from @repo/payments@0.0.0
│ npm error packages/payments
│ npm error @repo/payments@0.0.0
│ npm error node_modules/@repo/payments
│ npm error
│ npm error Could not resolve dependency:
│ npm error peerOptional zod@"^3.23.8" from openai@4.104.0
│ npm error node_modules/openai
│ npm error peer openai@"^4.86.1" from @stripe/agent-toolkit@0.9.0
│ npm error node_modules/@stripe/agent-toolkit
│ npm error @stripe/agent-toolkit@"^0.9.0" from @repo/payments@0.0.0
│ npm error packages/payments
│ npm error @repo/payments@0.0.0
│ npm error node_modules/@repo/payments
│ npm error
│ npm error Fix the upstream dependency conflict, or retry
│ npm error this command with --force or --legacy-peer-deps
│ npm error to accept an incorrect (and potentially broken) dependency resolution.
│ npm error
│ npm error For a full report see:
│ npm error C:\Users\...\AppData\Local\npm-cache\_logs\2026-04-03T02_18_02_446Z-eresolve-report.txt
│ npm error A complete log of this run can be found in: C:\Users\...\AppData\Local\npm-cache\_logs\2026-04-03T02_18_02_446Z-debug-0.log
■ Canceled
Desktop (please complete the following information):
Describe the bug
Running
npx next-forge@latest initcreates the project successfully, but the dependency installation step fails duringnpm installwith anERESOLVE unable to resolve dependency treeerror.The conflict appears to come from the
@repo/paymentsworkspace imported in apps/api, wherezod@4.3.6is installed, butopenai@4.104.0requirespeerOptional zod@"^3.23.8". Because of this, the initialization process is canceled before dependencies are fully installed.next-forge version
I am using version
next-forge@6.0.2.To Reproduce
Steps to reproduce the behavior:
npx next-forge@latest initsome-appnpm installfailure withERESOLVE unable to resolve dependency treeExpected behavior
The project should initialize completely and install dependencies successfully without requiring manual intervention such as
--legacy-peer-depsor forcing dependency resolution.Screenshots
Not applicable. Terminal output below:
Desktop (please complete the following information):