Skip to content

Unable to load entities after update to version 0.3.12Β #9766

@heldercunha

Description

@heldercunha

Issue description

After update the typeorm 0.3.11 to version 0.3.12, entities classes cannot be found by path

Expected Behavior

Found all entities classes to load.

All classes found using provided glob pattern "D:\projects\app\src\entities\**\*.entity{.ts,.js}"

Actual Behavior

No entities classes found

No classes were found using the provided glob pattern: "D:\projects\app\src\entities\**\*.entity{.ts,.js}"

Steps to reproduce

Create a new DataSource, configure the DataSource connection, and the entities path.

    const postgresqlDataSource: DataSource = new DataSource({
        type: 'postgres',
        applicationName: 'app,
        host: postgreSQL.host,
        port: postgreSQL.port,
        database: postgreSQL.database,
        username: postgreSQL.username,
        password: postgreSQL.password,
        useUTC: true,
        poolSize: 10,
        connectTimeoutMS: 0,
        dropSchema: false,
        synchronize: false,
        migrationsRun: false,
        uuidExtension: 'uuid-ossp',
        logging: true,
        entities: [join(__dirname, './entities/**/*.entity{.ts,.js}')],
        subscribers: [],
        migrations: [],
    });

My Environment

| Operating System | Windows 10 |
| Node.js version | 18.14.0 |
| Typescript version | 4.9.5 |
| TypeORM version | 0.3.12 |

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions