There was a problem loading the rivescript.js
script on this
page. This most likely means the script was not found where this page was
expecting it to be. If you're running this demo from the rivescript-js
git project, maybe you forgot to run npm run dist
?
The original version of this page looks for it at the relative path
../../dist/rivescript.js
. This is expecting the path to
the current page to be something like /eg/web-client/chat.html
from a web server started at the root of the rivescript-js project.
Double check that these path settings are correct.
If you have uploaded the web-client demo to a web server such as Apache,
ensure that the path is correct for where it looks for rivescript.js
.
It appears you have opened this page by double-clicking it in your file
browser: the URL of this page has a file:///
URL scheme.
Modern web browsers place security restrictions on locally opened web
pages which prevent them from running ajax requests for other local
files on your disk. Unfortunately, this means that the
RiveScript.loadFile()
function used on this page will
probably not work when you open this page locally.
See the README.md
file for some tips on how to run this
page in a web server environment. This will be required for the bot to
load the *.rive
files in a way that respects the Same
Origin Policy enforced by the web browser.