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. with native ESM #32

Open
carloslbello opened this issue Nov 15, 2024 · 1 comment
Open

This expression is not constructable. with native ESM #32

carloslbello opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@carloslbello
Copy link

When trying to compile the code in my repo here I get a TypeScript error:

src/index.ts:7:20 - error TS2351: This expression is not constructable.
  Type 'typeof import("/Users/carlosliam/icloudjs-test/node_modules/icloudjs/build/index")' has no construct signatures.

Other projects have dealt with similar issues, this comment may be helpful.

@foxt foxt changed the title TypeScript This expression is not constructable. This expression is not constructable. with native ESM Nov 15, 2024
@foxt
Copy link
Owner

foxt commented Nov 15, 2024

looks like you're using native ESM { "type": "module" }, which is currently something this library hasn't been built to support just yet, try switching to CJS or you might be able to get it to work by manually fudging with type imports

@foxt foxt self-assigned this Nov 15, 2024
@foxt foxt added the help wanted Extra attention is needed label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants