Skip to content

Conversation

@le-el
Copy link

@le-el le-el commented Dec 23, 2025

  • Problem: scripts/setup_env.sh installs npm via apt. On Ubuntu 24.04, this can fail due to dependency conflicts (especially when NodeSource repos are enabled), preventing environment setup.

  • Change: Remove npm from apt dependencies. Ensure node and npm are present by installing Node.js 20 via NodeSource when missing (Node.js includes npm). PM2 installation continues using npm.

  • Why safe: Existing systems with Node/npm already installed are unaffected; the script remains idempotent and works across Ubuntu versions.

  • Tested: Ubuntu 24.04 (noble) on EC2.

@le-el
Copy link
Author

le-el commented Dec 23, 2025

I tried to set up the miner by following the current miner/setup guide, but running scripts/setup_env.sh failed on Ubuntu 24.04. The issue comes from installing npm via apt, which on noble pulls many node-* dependencies and often conflicts with newer Node.js installs (e.g. NodeSource), causing the setup to break.

To fix this, I removed npm from the apt dependencies and instead ensure that Node.js (which already bundles npm) is installed when missing. This keeps the behavior the same on older Ubuntu versions while allowing the setup script to work correctly on 24.04 as well.

I tested this change on Ubuntu 24.04 (EC2), and the miner setup completes successfully after the fix.

@le-el
Copy link
Author

le-el commented Dec 23, 2025

image This is screenshot of that error message.

@anderdc anderdc closed this Jan 1, 2026
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

Successfully merging this pull request may close these issues.

2 participants