Closed cowwoc closed 1 year ago
Please don't remove the issue template, it's there for a reason.
rpt2 has a sizeable test suite, dogfoods itself, and has active reproduction environments. All of these currently work without errors. As a result, I cannot reproduce this.
An error message with no reproduction or details leaves us with almost no way of debugging. Please fill out the issue template, as is expected for all users and as is common courtesy for open-source projects.
The one tiny thing I can ascertain from the few details here is that the import is coming from dist/index
, but rpt2's package.json#main
is not a file named index
; there is no such file dist/index.js
.
Sorry. As you predicted, I can no longer reproduce this issue. I'll reopen if I ever run across this again. Thanks.
I think I stumbled upon something similar when making changes to our internal build. If you use a namespace import, as in:
import * as rpt2 from "rollup-plugin-typescript2";
and then try to use rpt2()
, you'll get this error, as the namespace is indeed not callable.
The correct syntax per the docs is to use the default import:
import rpt2 from 'rollup-plugin-typescript2';
When I try compiling code that uses your library with Typescript 5.1.6 I get the following error:
If I replace
rollup-plugin-typescript2
withrollup-plugin-typescript
this error disappears (but of course then I get a warning about missing @types)