baojs icon indicating copy to clipboard operation
baojs copied to clipboard

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

Open matronator opened this issue 2 years ago • 4 comments

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.

matronator avatar Jan 25 '23 14:01 matronator

Running into this issue as well.

theaaronmartin avatar Feb 04 '23 01:02 theaaronmartin

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

mattreid1 avatar Feb 04 '23 16:02 mattreid1

0.5.1

matronator avatar Feb 05 '23 10:02 matronator

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.

mptorz avatar Mar 30 '23 18:03 mptorz