UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.from (native)
Cannot convert the following text to okurigana. But if I remove "・" from the sentence, the error disappear.
await kuroshiro.convert(' 次にあげる「ブラック・ユーモア」の例を見れば、自分で判断を下すことができるだろう。', {mode:'okurigana', to:'hiragana'});
I'm using
"kuroshiro": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/kuroshiro/-/kuroshiro-1.1.2.tgz",
"integrity": "sha512-kM8OjYancYcr6awdfZum02tKR+p6+MheW+DojRHg71QunMdLPaXqY8sMP/FLsInioEiGs1T13zNyxjOG65K0KQ==",
"requires": {
"babel-runtime": "^6.26.0"
}
},
"kuroshiro-analyzer-kuromoji": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/kuroshiro-analyzer-kuromoji/-/kuroshiro-analyzer-kuromoji-1.1.0.tgz",
"integrity": "sha512-BSJFhpsQdPwfFLfjKxfLA9iL+/PC6LCR9vgwgb5Jc7jZwk9ilX8SAV6CwhAQZY611tiuhbB52ONYKDO8hgY1bA==",
"requires": {
"kuromoji": "^0.1.1"
}
Hello thuraucsy. I gave a try with you test sentence but nothing error happened and the result was right. What error message did you get?
@hexenq I got the following error.
UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.from (native)
@thuraucsy Still cannot reproduce the error. I think full error stacks or a runnable demo (such as jsbin) might be helpful.