# Install failed

> install_failed — dependencies did not install. The common causes and the fix.

Source: https://livops.dev/en/docs/error-install

`install_failed` — `npm install`, `pip install`, `bundle install` or `cargo fetch` ended with an error. The error itself is in the build log. A **Tip:** line at its end matches one of the sections below.

## Package versions do not fit together (npm)

The log says `ERESOLVE`. Two packages ask for different versions of one library. Fix `package.json`, or set **Settings → Install** to:

```sh
npm install --legacy-peer-deps
```

## A package compiles on install (npm)

The log says `gyp ERR! find Python`. Packages like `bcrypt` or an old `sqlite3` compile C code. Switch to a prebuilt one: `bcryptjs` instead of `bcrypt`. Otherwise add a Dockerfile to the project.

## A package compiles on install (Python)

`mysqlclient`, `psycopg2` and the like. We retry in an image with a compiler. If it still fails, use the variant that needs no compiling:

```text
psycopg2-binary   # instead of psycopg2
PyMySQL           # instead of mysqlclient
```

## Versions in requirements.txt contradict each other

The log says `ResolutionImpossible`. Loosen one of the `==` pins, for example `aiogram>=3.4` instead of `aiogram==3.4.1`.

## A package needs a newer Python

The log says `Requires-Python >=3.12`. Add a `.python-version` file at the project root:

```text
3.12
```

## A private registry asks for a login

The log says `E401`. Add the token in **Settings → Variables** as `NPM_TOKEN` and use it in `.npmrc`:

```text
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
```

## package.json asks for a Node version we do not have

Set `devEngines.runtime.version` to Node 22 or 24 — those are the ones we have. If `devEngines` names another package manager, add `"packageManager": "pnpm@9.15.0"` (or `yarn@`) to `package.json`.

## Gemfile.lock is for glibc only (Ruby)

The build runs on Alpine (musl). For Rails we try to fix this ourselves; if that does not work, run this once and commit:

```sh
bundle lock --add-platform x86_64-linux-musl
```

## Gemfile.lock is for an older Ruby

We build with Ruby 3.3. Run `bundle update` (or update the gems the log names) and commit `Gemfile.lock`.
