Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot call a class constructor without |new| on bun #10761

Open
1 of 18 tasks
glyh opened this issue Mar 9, 2024 · 1 comment
Open
1 of 18 tasks

TypeError: Cannot call a class constructor without |new| on bun #10761

glyh opened this issue Mar 9, 2024 · 1 comment

Comments

@glyh
Copy link

glyh commented Mar 9, 2024

Issue description

TypeError: Cannot call a class constructor without |new| on bun

Expected Behavior

No error

Actual Behavior

407 |                         ? entityTarget
408 |                         : undefined,
409 |                     subQuery: isSubquery ? entityTarget : undefined,
410 |                 });
411 |             }
412 |             const subQueryBuilder = entityTarget(this.subQuery());
                          ^
TypeError: Cannot call a class constructor without |new|
      at GenreAlias (:1:21)
      at createFromAlias (/home/lyh/Documents/CS/tools/jmetav/node_modules/typeorm/query-builder/QueryBuilder.js:412:37)
      at from (/home/lyh/Documents/CS/tools/jmetav/node_modules/typeorm/query-builder/SelectQueryBuilder.js:166:27)
      at /home/lyh/Documents/CS/tools/jmetav/src/info.ts:19:9
      at sanitizeGenres (/home/lyh/Documents/CS/tools/jmetav/src/info.ts:12:38)
      at /home/lyh/Documents/CS/tools/jmetav/src/info.ts:58:22
      at sanitizeMovie (/home/lyh/Documents/CS/tools/jmetav/src/info.ts:54:3)
      at /home/lyh/Documents/CS/tools/jmetav/src/index.ts:79:23
      at /home/lyh/Documents/CS/tools/jmetav/src/index.ts:75:64

Steps to reproduce

Install typeorm orm on Bun and write some demoes with a query builder.

My Environment

Dependency Version
Operating System Linux mechrevo 6.7.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 03 Mar 2024 00:30:36 +0000 x86_64 GNU/Linux
Node.js version Bun 1.0.30
Typescript version 5.3.3
TypeORM version 0.3.20

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?

I'm willing but I don't know where to start.

@angelxmoreno
Copy link

it would be helpful to post your package.json and tsconfig.json since those configurations have a direct impact on anyone's ability to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants