question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating @plumier/typeorm beyond version 1.0.1 causes ConnectionNotFoundError: Connection "default" was not found.

See original GitHub issue

Tested @plumier/typeorm versions 1.0.1 and 1.0.2 and 1.0.3-canary.6

These versions cause an error:

ConnectionNotFoundError: Connection "default" was not found.

      at new ConnectionNotFoundError (src/error/ConnectionNotFoundError.ts:8:9)
      at ConnectionManager.Object.<anonymous>.ConnectionManager.get (src/connection/ConnectionManager.ts:40:19)
      at Object.getConnection (src/index.ts:252:35)
      at Object.closeConnection (test/helper.ts:115:15)
      at Object.<anonymous> (test/user.spec.ts:21:9)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
almontassercommented, Jun 15, 2021

TypeError: Cannot read property ‘toString’ of undefined

This error has been fixed.

and the error:

ConnectionNotFoundError: Connection “default” was not found.

I was able to fix it, by changing the version of typeorm to the same version plumier uses. The error was Happening because there was two different typeorm packages.

1reaction
ktutnikcommented, Jun 14, 2021

@almontasser please try using 1.0.3-canary.7 it should fix the error TypeError: Cannot read property 'toString' of undefined. You can omit adding the inverse relation on @ManyToMany() with this fix.

This fix will be included in version 1.0.3 ETA around first week of July

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connection "default" was not found with TypeORM
We are using lerna and using code from library A in package B . The problem was that both TypeOrm versions in each...
Read more >
Connection "default" not found · Issue #4010 - GitHub
Server started on port 3333! ConnectionNotFoundError: Connection "default" was not found. at new ConnectionNotFoundError ...
Read more >
typeorm/typeorm - Gitter
"RepositoryNotFoundError: No repository for "MyModelName" was found. Looks like this entity is not registered in current "default" connection?".
Read more >
Typeorm Connection "default" was not found when...anycodings
A setup for all tests not desirable anycodings_typescript because not all test suites need anycodings_typescript database connection, while they ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found