Closed jloveric closed 7 years ago
I experienced the same issue some time ago. The problem seems to be a path mismatch for the wndb-with-exceptions
node module. In my case it expected the exception files (adj, adv, noun and verb) in the dict
subfolder but they were located in the data
subfolder. My quick workaround was to simply to copy these exception files to the data
subfolder. Not sure where this should/could be fixed though.
I can't reproduce this issue, and nothing has changed in the node-wordnet
or wndb-with-exceptions
module since an unrelated tar
issue, so I'm not sure what's going on here!
Steps I took:
yarn global add superscript
bot-init testbot
cd testbot
yarn
parse
yarn run start-telnet
telnet localhost 2000
And then I said a few things including 'hi' and 'good', both work fine.
Are there steps I'm missing here? BTW I did also try with npm
just in case postinstall
was behaving differently, but in this case it made no difference.
Perhaps the node/npm version plays a part?
I have run it in node versions 6.11.0 and 8.1.4 and it throws the same error.
The wndb-with-exceptions
module has the files in the correct folder for me.
I ran it in node 8.1.4, with both npm@5 and yarn@0.27, without error.
Hm, I just run it in 6.11.0 and it didn't throw the error. I tested both a new project and the one I am working on, and it didn't crash.
Spooky! I'll close this issue for now until there's a good repro, feel free to re-open anytime. :+1:
Just logging an instance of this.
Just did a reinstall, ran parse.js, then ran cleanup.js, and in my first telnet message to the bot it crashed.
.../node_modules/node-wordnet/lib/wordnet.js:431
exceptions[result.pos] = result.data;
^
TypeError: Cannot read property 'pos' of undefined
Ran cleanup.js again, and can no longer produce. Strange indeed.
CORRECTION: It is still happening. Continuing to investigate.
Confirming the temporary fix suggested by @rensdewolf.
@benhjames I wouldn't be surprised if the issue is with the tar issue - as what is happening is that the files aren't being copied from /data to /dict. Haven't yet solved - or figured out why this is just happening now for me after this reinstall. It is consistent and repeatable though.
I should be able to type any question without crashing the server, or at least get a good explanation for why.
after typing "good", telnet crashes. Not sure what the issue is, could be mongo or anything else, but appears to be in wordnet if result.pos is undefined.
This is on macosx