echamudi / japanese-toolkit

Monorepo for Kanji, Furigana, Japanese DB, and others
44 stars 3 forks source link

Kanji package does not work outside of Node enviroment #38

Open ranger-ross opened 2 years ago

ranger-ross commented 2 years ago

The kanji package appears to have been broken after the v0.3.1 release (starting in v0.5.0) in web browsers.

Running

kanji.jlpt.n5()

will yield the following error

Uncaught ReferenceError: __dirname is not defined
    at Jlpt.get n5 [as n5] (index.js:46:42)
echamudi commented 2 years ago

Hey, currently the Kanji package is only designed for the Node environment. I might make it available for the web as well though sometime in the future.