Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

293
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!