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]: rm -rf .next won't work on Nixpacks build #4589

Open
rgbjoy opened this issue Dec 15, 2024 · 2 comments
Open

[Bug]: rm -rf .next won't work on Nixpacks build #4589

rgbjoy opened this issue Dec 15, 2024 · 2 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 💤 Waiting for feedback Issues awaiting a response from the author.

Comments

@rgbjoy
Copy link

rgbjoy commented Dec 15, 2024

Error Message and Logs

When trying to do rm -rf .next on a Nixpacks build the deploy fails and I get rm: cannot remove '.next/cache': Device or resource busy

Steps to Reproduce

  1. Add rm -rf .next into your build step
  2. Review deploy logs
  3. Deploy fails and reads rm: cannot remove '.next/cache': Device or resource busy

Example Repository URL

No response

Coolify Version

v4.0.0-beta.379

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Additional Information

No response

@rgbjoy rgbjoy added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Dec 15, 2024
@rgbjoy
Copy link
Author

rgbjoy commented Dec 15, 2024

I tried to use my own nixpacks.toml to maybe have a bit more granular control

# nixpacks.toml

[phases.install]
cmd = "pnpm install"

[phases.build]
cmd = "pnpm migrate_build"

[phases.start]
cmd = "pnpm start"

[static_cache]
paths = []

I get this

2024-Dec-15 18:11:21.102604
Error: Failed to parse Nixpacks config file `/artifacts/thegameplan.json`
2024-Dec-15 18:11:21.102604
2024-Dec-15 18:11:21.102604
Caused by:
2024-Dec-15 18:11:21.102604
    invalid length 0, expected struct Phase with 11 elements at line 60 column 19

@peaklabs-dev
Copy link
Member

Can you check if some processes are using the directory with lsof +D .next/cache and also is the directory a mount point df -h. Also, it would help a lot with debugging if you could provide a sample repository.

@peaklabs-dev peaklabs-dev added 💤 Waiting for feedback Issues awaiting a response from the author. and removed 🔍 Triage Issues that need assessment and prioritization. labels Dec 16, 2024
@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 💤 Waiting for feedback Issues awaiting a response from the author.
Projects
None yet
Development

No branches or pull requests

2 participants