kuroshiro
kuroshiro copied to clipboard
Please help with this issue. path.join is not a function
I have the same issue ☹️
I ran into the same error! :(
Hi everyone.
U can't call packages in the browser. Use them in node js instead.
I use Sveltekit and put them to a page server ts which uses node js in the background.
import Kuroshiro from 'kuroshiro';
import KuromojiAnalyzer from 'kuroshiro-analyzer-kuromoji';
const kuroshiro = new Kuroshiro();
export const load = async () => {
await kuroshiro.init(new KuromojiAnalyzer());
const result = await kuroshiro.convert(
'感じ取れたら手を繋ごう、重なるのは人生のライン and レミリア最高!',
{ to: 'hiragana', mode: 'furigana' }
);
return { result };
};