kuroshiro icon indicating copy to clipboard operation
kuroshiro copied to clipboard

Error when using demo code

Open eric999j opened this issue 2 years ago • 4 comments

FireShot Capture 518 - RunKit + npm_ kuroshiro - npm runkit com

TypeError: Kuroshiro is not a constructor

eric999j avatar Nov 26 '21 08:11 eric999j

becase the demo code is not correct, it shoulde be let Kuroshiro = require('kuroshiro').default;

halfsprit avatar Feb 19 '22 03:02 halfsprit

It works under v1.1.2, but not latest, just like described in issues #66. Just find package.json and under dependencies put `"kuroshiro": "~1.1.2", this will let your package manager rollback the version from latest to 1.1.2 where it still works.

yuuz233 avatar Jul 30 '22 04:07 yuuz233

becase the demo code is not correct, it shoulde be let Kuroshiro = require('kuroshiro').default;

Is there a solution for ES6?

Anatoly03 avatar Sep 19 '23 09:09 Anatoly03

@yuuz233's solution works, thank you

Anatoly03 avatar Sep 19 '23 09:09 Anatoly03