kuroshiro icon indicating copy to clipboard operation
kuroshiro copied to clipboard

UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.from (native)

Open thuraucsy opened this issue 6 years ago • 3 comments

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

thuraucsy avatar Aug 15 '19 05:08 thuraucsy

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 avatar Feb 08 '20 09:02 hexenq

@hexenq I got the following error.

UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object at Function.from (native)

thuraucsy avatar Feb 17 '20 06:02 thuraucsy

@thuraucsy Still cannot reproduce the error. I think full error stacks or a runnable demo (such as jsbin) might be helpful.

hexenq avatar Feb 18 '20 09:02 hexenq