---
# System prepended metadata

title: 'Fuel Indexer failed to compile due to  `sqlx::Postgres` struct is being  passed `to fuel_indexer_database/sqlite/` crate functions while using `postgres` database'

---

# Fuel Indexer failed to compile due to  `sqlx::Postgres` struct is being  passed `to fuel_indexer_database/sqlite/` crate functions while using `postgres` database


Hi Team,
I am following [fuel indexer quickstart](https://fuellabs.github.io/fuel-indexer/master/quickstart/index.html#6-start-the-service--deploy-your-index) where it says to run the node so after set up the `DATABASE_URL` on both `sqlite` and `postgres` crate `.env` file finally i could run the local node  using `cargo run --bin fuel-node` cmd.

This is check command result
```console=
➜  ~ forc index check                         

❌ Could not connect to indexer service: error sending request for url (http://127.0.0.1:29987/api/health): error trying to connect: tcp connect error: Connection refused (os error 111)
   
+--------+-------------------------+----------------------------------------------------------------------------+
| Status |       Component        |                                  Details                                   |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | fuel-indexer binary    |Could not located 'fuel-indexer'                                            |
+--------+------------------------+----------------------------------------------------------------------------+
|   ⛔️   | fuel-indexer service   |  Failed to detect a locally running fuel-indexer service at Port(29987).   |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | psql                   |  Found 'psql' at '/usr/bin/psql'                                           |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | sqlite                 |  Found 'sqlite' at '/usr/bin/sqlite'                                       |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | fuel-core              |  Found 'fuel-core' at '/home/ahimas/.cargo/bin/fuel-core'                  |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | docker                 |Could not located 'docker'                                                  |
+--------+------------------------+----------------------------------------------------------------------------+
|   ✅   | fuelup                 |  Found 'fuelup' at '/home/ahimas/.fuelup/bin/fuelup'                       |
+--------+------------------------+----------------------------------------------------------------------------+

```

After running the local node it says to run the indexer but in the document nowhere it says how to install `forc index` properly example in the [quickstart guide](https://fuellabs.github.io/fuel-indexer/master/quickstart/index.html#quickstart) there is a hyperlink about installing `forc index` plugin via `fuelup` but that url redirects to `http://localhost:3000/plugins/forc-index.html`. Finally i installed index using `cargo install forc index` also i tried to install using `fuelup component add index` which did not work out .

Once i installed the indexer i executed the following command
```cmd=
forc index start --background
```
And i got the following error message
```console=
➜  ~ forc index start --background            
thread 'main' panicked at '❌ Failed to spawn fuel-indexer child process.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/forc-index-0.1.11/src/ops/forc_index_start.rs:31:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

After i tried to build the fuel indexer locallay and i did the followings.

1. Run the node using `fuel-core run` cmd.
2. Set postgres `DATABASE_URL` and ran the migration scripts.
3. 