Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nextjs Deployment failed on v4.0.0-beta.389 with Nixpacks #4958

Closed
ScorpyG opened this issue Jan 25, 2025 · 2 comments
Closed

[Bug]: Nextjs Deployment failed on v4.0.0-beta.389 with Nixpacks #4958

ScorpyG opened this issue Jan 25, 2025 · 2 comments

Comments

@ScorpyG
Copy link

ScorpyG commented Jan 25, 2025

Error Message and Logs

My failed deployment resulted from missing/undefined $NIXPACKS_PATH and incompatible node engine. Both are un-configurable on my end. Since I'm on the latest version of coolify I figured create an issue to echo the problem. Screenshot of the error log down below

Image

Steps to Reproduce

  1. Connect Coolify to Github App
  2. Create Resource for one of the Next.js repo
  3. Select Nixpacks as Build Pack (keeping the default config for port and everything else)
  4. Hit the Deploy button and pray

Example Repository URL

No response

Coolify Version

v4.0.0-beta.389

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.10

Additional Information

No response

@ScorpyG ScorpyG added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 25, 2025
@fabianbeier
Copy link

Have the exact same problem since yesterday with a Strapi instance. Tried #4871 (comment) but it didn't resolve the issue.

79.61 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-25T00_15_30_038Z-debug-0.log
------
 1 warning found (use docker --debug to expand):
 - UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18)
Dockerfile:20
--------------------
  18 |     ENV NIXPACKS_PATH=/app/node_modules/.bin:$NIXPACKS_PATH
  19 |     COPY . /app/.
  20 | >>> RUN --mount=type=cache,id=vko0coos8w8gkg4og8sg0oso-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 npm install --frozen-lockfile --ignore-engines --legacy-peer-deps

@ScorpyG
Copy link
Author

ScorpyG commented Jan 25, 2025

Hmm after digging around, one of my dependencies graphql-ws required node version >= 20 that is conflicted with the default node environment (v18.20.2) that was used by Nixpacks resulted in the error above. As stated in the error log so I added the minimum node version requirement into package.json as suggested by one of the Coolify community member.

...
"engines": {
  "node": ">= 20"
}
...

@ScorpyG ScorpyG closed this as completed Jan 25, 2025
@github-actions github-actions bot removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants