I am trying to use the npm rivescript package with Typescript (assuming it can be done) and whenever 'bot.loadFile()' is called I get the same error from the rivescript.js file in the package saying 'self._node.fs.readFile()' is not a function. Is this an error in the code or is the code not compatible with Typescript? This is how far the code runs before the error occurs:
bot = new RiveScript({utf8: true});
bot.loadFile("brain.rive").then(botReady).catch(botError);
I am trying to use the npm rivescript package with Typescript (assuming it can be done) and whenever 'bot.loadFile()' is called I get the same error from the rivescript.js file in the package saying 'self._node.fs.readFile()' is not a function. Is this an error in the code or is the code not compatible with Typescript? This is how far the code runs before the error occurs:
bot = new RiveScript({utf8: true}); bot.loadFile("brain.rive").then(botReady).catch(botError);
Thanks