coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Can't Deploy NextJS App via PNPM

Open 0-BSCode opened this issue 6 months ago • 3 comments

Error Message and Logs

When trying to deploy a newly initialized NextJS app via Nixpack and PNPM, it's unable to resolve the install command due to an EHOSTUNREACH error.

Image

Steps to Reproduce

  1. Create new NextJS app via pnpm dlx create-next-app@latest
  2. Push app to public Github repository
  3. Create a public github repository resource on Coolify
  4. Select the Nixpack deploy option
  5. Use the following commands:
    • Install Command: pnpm install
    • Build Command: pnpm run build
    • Start Command: pnpm run start
  6. Deploy application

Example Repository URL

https://github.com/0-BSCode/NextJS-ISR-Test

Coolify Version

v4.0.0-beta.418

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

I saw one other issue that encountered the same problem, but it's now closed. OP said it was a temporary issue and it went away after a while, but another user commented a month later that they also ran into the same issue. The original issue was closed without providing a workaround.

0-BSCode avatar Jun 16 '25 13:06 0-BSCode

Also ran into this problem !

sethonne avatar Jun 16 '25 13:06 sethonne

this will be either a network issue related to your host location or an issue with the cdn you see from your host location, either way this isn't a bug with coolify, you need to wait till it's resolved

djsisson avatar Jun 16 '25 14:06 djsisson

this will be either a network issue related to your host location or an issue with the cdn you see from your host location, either way this isn't a bug with coolify, you need to wait till it's resolved

Thanks for the speedy response! I was thinking the same, but I tried redeploying another one of my nextjs projects with a similar setup (PNPM + Nixpack) by selecting the "Force deploy (without cache)" button and the packages are installed without an issue.

Image

My understanding is that the "Force deploy (without cache)" button will cause the packages to be re-installed as the deploy will ignore cache. Am I understanding this right and, if so, would it mean that this is not a networking or cdn issue?

0-BSCode avatar Jun 16 '25 14:06 0-BSCode

@0-BSCode can you try changing the node version in your dockerfile to 20/22 or 24

djsisson avatar Jun 16 '25 17:06 djsisson

Closing old issue. Reopen if still reproducible.

andrasbacsai avatar Sep 30 '25 10:09 andrasbacsai