hexenq / kuroshiro

Japanese language library for converting Japanese sentence to Hiragana, Katakana or Romaji with furigana and okurigana modes supported.
https://kuroshiro.org
MIT License
837 stars 94 forks source link

ESM下有以下错误,能帮忙解答一下吗?感谢! #107

Open frandlee opened 1 year ago

frandlee commented 1 year ago

TypeError: Kuroshiro is not a constructor

kanido386 commented 1 year ago

Hi @frandlee We should use const Kuroshiro = require("kuroshiro").default; instead of the example one const Kuroshiro = require("kuroshiro");.