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

This expression is not constructable. Type 'typeof import(...) has no construct signatures. #20

Open
matronator opened this issue Jan 25, 2023 · 4 comments

Comments

@matronator
Copy link

Started a new project and created index.ts with this inside:

import Bao from "baojs";

const app = new Bao();

But the new Bao() is underlined with the following error:

This expression is not constructable.
  Type 'typeof import("/path/to/project/node_modules/baojs/dist/index")' has no construct signatures.

I'm using version 0.2.1.

@theaaronmartin
Copy link

Running into this issue as well.

@mattreid1
Copy link
Owner

I'll try to reproduce, what version of Bun are you running?

@matronator
Copy link
Author

0.5.1

@mptorz
Copy link

mptorz commented Mar 30, 2023

I am running into this issue as well.

  1. I installed Bao
  2. I run bun init
  3. I run bun add baojs
  4. I pasted this into index.ts
import Bao from "baojs";
const app = new Bao();

I got exactly the same error. Using Bun v0.5.8 and Bao 0.2.1. I tried on intel macbook and m1 macbook.

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

No branches or pull requests

4 participants