/Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/lib/natural/trie/trie.js:62
return next.addString(string.substring(1));
^
TypeError: string.substring is not a function
at Trie.addString (/Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/lib/natural/trie/trie.js:62:31)
at Trie.addStrings (/Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/lib/natural/trie/trie.js:70:8)
at collector (/Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/src/rand.js:145:14)
at piper.wrapper (/Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/src/piper.js:67:14)
at executeBound (/Users/pro/github/wordbot/node_modules/_underscore@1.8.3@underscore/underscore.js:701:67)
at bound (/Users/pro/github/wordbot/node_modules/_underscore@1.8.3@underscore/underscore.js:733:14)
at /Users/pro/github/wordbot/node_modules/_wordpos@1.1.5@wordpos/src/indexFile.js:88:6
at FSReqWrap.wrapper [as oncomplete] (fs.js:629:17)
@futurist I'm not able to reproduce. Are you able to reproduce consistently? If so, you might try putting a console.log at that location to see what string is.
Throw error when run below code (v1.1.5)
The error is below: