Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

298
Vistas
Upgrade Typeorm version 0.2.28 to 0.2.45

I want to upgrade my typeorm version from 0.2.28 to 0.2.45 but when I tried to start the server I had an error that said:

C:\Users\user\Documents\project\server\src\connection\ConnectionOptionsReader.ts:154
        connectionOptions.forEach(options => {
                          ^
TypeError: Cannot add property baseDirectory, object is not extensible
    at C:\Users\user\Documents\project\server\src\connection\ConnectionOptionsReader.ts:155:34
    at Array.forEach (<anonymous>)
    at ConnectionOptionsReader.normalizeConnectionOptions (C:\Users\user\Documents\project\server\src\connection\ConnectionOptionsReader.ts:154:27)
    at ConnectionOptionsReader.<anonymous> (C:\Users\user\Documents\project\server\src\connection\ConnectionOptionsReader.ts:141:25)
    at step (C:\Users\user\Documents\project\server\node_modules\tslib\tslib.js:144:27)
    at Object.next (C:\Users\user\Documents\project\server\node_modules\tslib\tslib.js:125:57)
    at fulfilled (C:\Users\user\Documents\project\server\node_modules\tslib\tslib.js:115:62)

any hint ? I don't know where is the problem

Edit: I found that the problem comes from version 0.2.42 , in the changelog there is a breaking changes

update listeners and subscriber no longer triggered by soft-remove and recover

Do you guys have an idea to how to fix it ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found that the problem was in createConnection, it was like that:

createConnection().then(async () => {
  console.log(`Server is running at http://localhost:${PORT} `);
});

and i just added the ormconfig as argument in createConnection:

createConnection({
    "type": "postgres",
    "schema": "",
    "host": "",
    "username": "",
    "password": "",
    "database": "test",
    "port": 5300,
    "synchronize": true,
    "logging": true,
    "entities": ["src/**/*.entity.ts"],
    "migrations": ["src/migration/**/*.ts"],
    "subscribers": ["src/**/subscriber/**/*.ts"],
    "cli": {
      "entitiesDir": "src/entity",
      "migrationsDir": "src/migration",
      "subscribersDir": "src/subscriber"
    }
  }).then(async () => {
  console.log(`Server is running at http://localhost:${PORT} `);
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda