-
Notifications
You must be signed in to change notification settings - Fork 653
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
compromise_1.default is not a function #687
Comments
Hey @alexcheninfo, I just tested with the same setup and a fresh compromise definitely has a default export, but for now a workaround might be adding |
@Drache93 Thanks for helping. I don't have a This is how my
As you can see, I added VS Code is also showing another problem. It's in
Not sure if that has anything to do with the original problem. |
No problem! Ah right, just tried your config definitely the problem. Played around, looks like this boy here fixes your original problem (is included in default tsconfig -
|
@Drache93 That did it. Thanks, this problem had been bugging me for a while! |
@alexcheninfo Glad I could help! |
Help with spencermountain#699 and spencermountain#687
Is setting |
Hi @twgraham thanks for the feedback. What's the effect on your other libraries? Could we reopen this please @spencermountain ? |
Sorry for the delay in responding @Drache93. Don't mind me, just having a whinge. The issue I saw was that all existing star imports would fail when
I don't really want to suggest rewriting your types, especially when the solution suggested is the recommended solution by TS themselves. I'll suck it up and rewrite all my imports 👍 |
I'm getting this error:
when doing:
With the following in my
Am I missing something? If I change the relevant types file to have:
Everything works fine. |
Ah nice find. Looks like Fixed here: #749 |
@Drache93 Ah great, thanks! |
Anyone know of any fork where someone has fixed the types in this library so we don't need to change our imports? |
hey Anish, i can push a hotfix release for the type change that changed in vscode recently. |
Hm I think that may be unrelated to this issue. I meant fixing the types files so we don't get the |
This is what I did:
Then I pasted the node module example:
Then did:
And I got this error:
The same happened when I was working in a VS Code
extension.ts
file. (So maybe Compromise has problems running in TypeScript files?). Compromise worked well after I changedimport nlp from 'compromise'
toconst nlp = require('compromise')
.Note: These are the versions of the packages.
The text was updated successfully, but these errors were encountered: