nestjs-realworld-example-app icon indicating copy to clipboard operation
nestjs-realworld-example-app copied to clipboard

Error (AggregateError) following the README.md

Open Esquimor opened this issue 1 year ago • 3 comments

Hello,

I look to Mikro-orm with nestjs but I can't launch it with sqlite. So, I try to clone this repo and follow the README.md.

List of commands I do:

  • git clone https://github.com/mikro-orm/nestjs-realworld-example-app.git
  • cd nestjs-realworld-example-app
  • yarn
  • cp src/config.ts.example src/config.ts
  • cp src/mikro-orm.config.ts.example src/mikro-orm.config.ts
  • yarn start

But I got this error:

[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [NestFactory] Starting Nest application...
[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [MikroORM] [info] MikroORM version: 6.4.2
[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [MikroORM] [discovery] ORM entity discovery started, using TsMorphMetadataProvider
[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [InstanceLoader] MikroOrmModule dependencies initialized +1ms
[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [MikroORM] [discovery] - processing 4 files
[Nest] 22833  - 12/26/2024, 6:19:51 PM     LOG [MikroORM] [discovery] - processing entity Article (..path/nestjs-realworld-example-app/dist/article/article.entity.js)
[Nest] 22833  - 12/26/2024, 6:19:52 PM     LOG [MikroORM] [discovery] - processing entity Comment (..path//nestjs-realworld-example-app/dist/article/comment.entity.js)
[Nest] 22833  - 12/26/2024, 6:19:52 PM     LOG [MikroORM] [discovery] - processing entity Tag (..path/nestjs-realworld-example-app/dist/tag/tag.entity.js)
[Nest] 22833  - 12/26/2024, 6:19:52 PM     LOG [MikroORM] [discovery] - processing entity User (..path/nestjs-realworld-example-app/dist/user/user.entity.js)
[Nest] 22833  - 12/26/2024, 6:19:52 PM     LOG [MikroORM] [discovery] - entity discovery finished, found 6 entities, took 1133 ms
[Nest] 22833  - 12/26/2024, 6:19:52 PM     LOG [MikroORM] [query] select 1 from information_schema.schemata where schema_name = 'nestjsrealworld' [took 8 ms]
[Nest] 22833  - 12/26/2024, 6:19:52 PM   ERROR [ExceptionHandler] 
AggregateError [ECONNREFUSED]: 
    at internalConnectMultiple (node:net:1116:18)
    at afterConnectMultiple (node:net:1683:7)

I only find this resource https://stackoverflow.com/questions/77051091/nestjs-aggregateerror-while-starting-the-project but not very helpfull. There is maybe a config to change but I don't know what.

Esquimor avatar Dec 26 '24 17:12 Esquimor

This example app is not using sqlite, so you must have had changed more than just what you say.

B4nan avatar Dec 26 '24 17:12 B4nan

Ok, I just understand the example use mysql.

Sorry, I will try with a mysql database later (I can't for do it now).

Also, I change nothing.

Esquimor avatar Dec 26 '24 18:12 Esquimor

If you changed nothing, then the problem is you dont have mysql server running.

B4nan avatar Dec 26 '24 18:12 B4nan

Closing as stale

B4nan avatar Aug 27 '25 17:08 B4nan