-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module '${HOME}/host.js' #118
Comments
justfortherec
added a commit
to justfortherec/native-client
that referenced
this issue
Jan 6, 2023
It appears that Firefox starts the native client from `$HOME` as the working directory. That leads to the script resolving the relative path host.js as `$HOME/host.js`. This fix prefixes the `host.js` filename with the directory of the run.sh file. Now it works regardless of the working directory and regardless of the directory in which `run.sh` and the JavaScript files are located (as long as they are in the same location). Fix: andy-portmen#118, andy-portmen#116
This was referenced Jan 6, 2023
justfortherec
added a commit
to justfortherec/native-client
that referenced
this issue
Jan 6, 2023
It appears that Firefox starts the native client from `$HOME` as the working directory. That leads to the script resolving the relative path host.js as `$HOME/host.js`. This fix prefixes the `host.js` filename with the directory of the run.sh file. Now it works regardless of the working directory and regardless of the directory in which `run.sh` and the JavaScript files are located (as long as they are in the same location). Fix: andy-portmen#118
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am unable to connect Firefox with the native client because the path to
host.js
in therun.sh
script is not found.This is the error message that I see in the browser console:
(Note that I've replaced the actual path to my home directory with
${HOME}
when copying the message)It appears that Firefox starts the native client from
$HOME
as the working directory.That leads to the script resolving the relative path
host.js
as$HOME/host.js
.I was able to fix this by applying the following tiny patch to
run.sh
:This prefixes the
host.js
filename with the directory of therun.sh
file — regardless of the working directory and regardless of the directory in whichrun.sh
and the JavaScript files are located (as long as they are in the same location).The text was updated successfully, but these errors were encountered: