kuroshiro icon indicating copy to clipboard operation
kuroshiro copied to clipboard

Please help with this issue. path.join is not a function

Open mhqihan opened this issue 1 year ago • 3 comments

image image

mhqihan avatar May 19 '23 09:05 mhqihan

I have the same issue ☹️

Hadjimina avatar May 29 '23 07:05 Hadjimina

I ran into the same error! :(

Judy-Nihao avatar Jul 03 '23 12:07 Judy-Nihao

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 };
};

milimyname avatar Aug 18 '23 18:08 milimyname