Skip to content

Failed deploy when creating api functions from nextjs #9319

@x5engine

Description

@x5engine

● (SSG) prerendered as static HTML (uses getStaticProps)
ƒ (Dynamic) server-rendered on demand

Building a Cloud Function to run this application. This is needed due to:
• Image Optimization
• non-static route /api/addParticipant
• non-static route /api/assistant
• non-static route /api/apply
• non-static route /api/assistantMistral
• and 126 other reasons, use --debug to see more

Failed to find esbuild with npx which: Error: Command failed: npx which esbuild
esbuild not found, installing...
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error peer react@">=16.8.6" from @dytesdk/[email protected]
npm error node_modules/@dytesdk/react-ui-kit
npm error @dytesdk/react-ui-kit@"^1.61.4" from the root project
npm error peer react@">=16.8.6" from @dytesdk/[email protected]
npm error node_modules/@dytesdk/react-web-core
npm error @dytesdk/react-web-core@"^1.35.15" from the root project
npm error 81 more (@embedapi/react, @emotion/react, @emotion/styled, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.3.0" from [email protected]
npm error node_modules/react-mathjax
npm error react-mathjax@"^1.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error peer react@"^16.3.0" from [email protected]
npm error node_modules/react-mathjax
npm error react-mathjax@"^1.0.1" from the root project
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
npm error For a full report see:
npm error /home/ucefkh/.npm/_logs/2025-10-15T10_15_38_154Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/ucefkh/.npm/_logs/2025-10-15T10_15_38_154Z-debug-0.log
Unable to bundle next.config.js for use in Cloud Functions, proceeding with deploy but problems may be encountered.
Failed to install esbuild: Error: Command failed: npm install esbuild@^0.19.2 --no-save
⚠ This integration expects Node version 16, 18, or 20. You're running version 22, problems may be encountered.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error react@"^18.2.0" from the root project
npm error peer react@">=16.8.6" from @dytesdk/[email protected]
npm error node_modules/@dytesdk/react-ui-kit
npm error @dytesdk/react-ui-kit@"^1.61.4" from the root project
npm error 81 more (@dytesdk/react-web-core, @embedapi/react, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.3.0" from [email protected]
npm error node_modules/react-mathjax
npm error react-mathjax@"^1.0.1" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error peer react@"^16.3.0" from [email protected]
npm error node_modules/react-mathjax
npm error react-mathjax@"^1.0.1" from the root project
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
npm error For a full report see:
npm error /home/ucefkh/.npm/_logs/2025-10-15T10_15_42_214Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/ucefkh/.npm/_logs/2025-10-15T10_15_42_214Z-debug-0.log

Error: An unexpected error has occurred.

also one thing i dont use npm i use yarn to build and run it

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions