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

TypeError: Kuroshiro is not a constructor #66

Closed
Tenpi opened this issue Jul 19, 2019 · 4 comments
Closed

TypeError: Kuroshiro is not a constructor #66

Tenpi opened this issue Jul 19, 2019 · 4 comments

Comments

@Tenpi
Copy link

Tenpi commented Jul 19, 2019

I get this error using both import and require statements. I have tried reinstalling the package but it does not work.

Import:
import Kuroshiro from "kuroshiro";
const kuroshiro = new Kuroshiro();

Require:
const {Kuroshiro} = require("kuroshiro");
const kuroshiro = new Kuroshiro();

@Tenpi
Copy link
Author

Tenpi commented Jul 29, 2019

I fixed this issue, nvm.

@Tenpi Tenpi closed this as completed Jul 29, 2019
@danghuudat
Copy link

how can you fix it?

@univeous
Copy link

univeous commented Jul 9, 2021

@danghuudat I have the same issue, and it works fine when I changed to use kuroshiro 1.1.2 version.

@hw4n
Copy link

hw4n commented Oct 13, 2021

I can confirm @univeous' solution works.

in package.json, mine looked like the following:
"kuroshiro": "^1.1.2",

however yarn install installed kuroshiro version 1.1.0, and the error was there

so changing that line to the following fixed the problem (replace caret with tilde)
"kuroshiro": "~1.1.2",

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