next-forge init fails with npm ERESOLVE due to zod version conflict in @repo/payments workspace

Author: mauriantolinCreated Apr 3, 2026Updated Apr 3, 2026
Labelsbug

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 [email protected] is installed, but [email protected] 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 [email protected].

To Reproduce
Steps to reproduce the behavior:

  1. Open a terminal in a Windows environment.
  2. Run npx next-forge@latest init
  3. Enter a project name, for example some-app
  4. Let the scaffolding finish and wait for the dependency installation step
  5. 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:

bash
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/[email protected]
│  npm error Found: [email protected]
│  npm error node_modules/zod
│  npm error   zod@"^4.3.6" from @repo/[email protected]
│  npm error   packages/payments
│  npm error     @repo/[email protected]
│  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 [email protected]
│  npm error   node_modules/ai
│  npm error     peer ai@"^5.0.89" from @stripe/[email protected]
│  npm error     node_modules/@stripe/agent-toolkit
│  npm error       @stripe/agent-toolkit@"^0.9.0" from @repo/[email protected]
│  npm error       packages/payments
│  npm error         @repo/[email protected]
│  npm error         node_modules/@repo/payments
│  npm error
│  npm error Could not resolve dependency:
│  npm error peerOptional zod@"^3.23.8" from [email protected]
│  npm error node_modules/openai
│  npm error   peer openai@"^4.86.1" from @stripe/[email protected]
│  npm error   node_modules/@stripe/agent-toolkit
│  npm error     @stripe/agent-toolkit@"^0.9.0" from @repo/[email protected]
│  npm error     packages/payments
│  npm error       @repo/[email protected]
│  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):

  • OS: Windows
  • Browser: N/A