subql icon indicating copy to clipboard operation
subql copied to clipboard

Unable to run Ethereum node outside Docker

Open livthomas opened this issue 1 year ago • 0 comments

Prerequisites

  • [x] Are you running the latest version(s)?
  • [x] Have you searched the documentation for your issue?
  • [x] Did you search for an existing issue or pull request?

Description

According to Running SubQuery Locally page in the documentation, it should be possible to run both the indexer and the query service outside of Docker. However, I'm unable to run either of those two processes.

Details

These details can help to reproduce the environment the issue is occurring

Local Environment: @subql/cli/4.2.5 darwin-arm64 node-v18.18.2 Query Version: [email protected] Indexer Version: [email protected] Network Details: Ethereum Goerli testnet

Steps to Reproduce

  1. Clone https://github.com/subquery/ethereum-subql-starter
  2. Go to /Ethereum/ethereum-goerli-starter/ folder
  3. Run yarn install && yarn codegen && yarn build
  4. Run yarn subql-node-ethereum -f . --db-schema=app --workers=4 --batch-size=30 --unfinalized-blocks=true

Example project: https://github.com/subquery/ethereum-subql-starter/tree/main/Ethereum/ethereum-goerli-starter

Expected behavior: The node should start the same way as if it was run inside a Docker container.

Actual behavior: The node fails with some NestJS error:

2024-02-01T15:54:05.404Z <subql-node> INFO Current @subql/node-ethereum version is 3.7.0
2024-02-01T15:54:05.405Z <subql-node> INFO Current @subql/node-ethereum version is 3.7.0
2024-02-01T15:54:05.421Z <ProjectUpgradeSevice> INFO Projects: {
  "8955994": "/Users/livthomas/Projects/subquery/ethereum-subql-starter/Ethereum/ethereum-goerli-starter"
}
2024-02-01T15:54:05.457Z <nestjs> INFO Starting Nest application...
2024-02-01T15:54:05.500Z <nestjs> INFO AppModule dependencies initialized
2024-02-01T15:54:05.500Z <nestjs> INFO ConfigureModule dependencies initialized
2024-02-01T15:54:05.500Z <nestjs> ERROR Nest can't resolve dependencies of the ProjectService (DsProcessorService, ApiService, PoiService, PoiSyncService, ?, ISubqueryProject, IProjectUpgradeService, StoreService, NodeConfig, DynamicDsService, EventEmitter, UnfinalizedBlocksService). Please make sure that the argument Sequelize at index [4] is available in the FetchModule context.

Potential solutions:
- Is FetchModule a valid NestJS module?
- If Sequelize is a provider, is it part of the current FetchModule?
- If Sequelize is exported from a separate @Module, is that module imported within FetchModule?
  @Module({
    imports: [ /* the Module containing Sequelize */ ]
  })

error Command failed with exit code 1.

Any other information

I have the PostgreSQL database running inside Docker (created by Docker Compose) and I set the following env variables:

DB_USER=postgres
DB_PASS=postgres
DB_DATABASE=postgres
DB_HOST=localhost
DB_PORT=5432

livthomas avatar Feb 01 '24 16:02 livthomas