M
biznis883-cell
FREEOP

9 days ago

Fix the npm install/build error in this project.

The deployment currently fails while building the native dependency "deasync":

npm error path /app/node_modules/deasync

npm error command sh -c node ./build.js

node v24.21.0

node-gyp v8.4.1

Python 3.13.5

ModuleNotFoundError: No module named 'distutils'

Please inspect the project's package.json, package-lock.json and deployment configuration.

Make the smallest safe changes necessary to get npm install working on Railway. In particular:

  1. Check whether the project really needs "deasync".
  2. If it is required, use a version/configuration compatible with the Node.js version used by the project, or update the native build tooling appropriately.
  3. Prefer a stable Node.js LTS version supported by the project's dependencies instead of Node 24 if necessary.
  4. Do not simply disable npm install errors or use --ignore-scripts.
  5. Do not remove dependencies unless you verify they are unused.
  6. Update package.json/package-lock.json and deployment configuration as necessary.
  7. After making changes, run npm install and verify that it completes successfully.
  8. Do not modify the bot's commands or functionality.

The important error is:

ModuleNotFoundError: No module named 'distutils'

Please fix the underlying compatibility problem and give me the exact files/changes you made.

$10 Bounty

2 Replies

Railway
BOT

9 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 9 days ago


I'd try updating the node-gyp package to a newer version (v10+). Also, you can try downgrading the Node version being used from 24 to 20.


versehard
FREE

9 days ago

I think the main issue here is node-gyp 8.4.1 running with Python 3.13.5. Python 3.12+ removed distutils, so that older node-gyp version can break exactly like this.

Before changing a bunch of stuff though, could you share the repo or at least the package.json + package-lock.json?

I’d first check which version of deasync is actually being installed and whether it’s a direct dependency or coming from another package. Then we can figure out whether the cleanest fix is updating deasync/node-gyp or just pinning a different Node version.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...