Open l4cr0ss opened 6 years ago
Have similar issue. Must run on localhost or nothing. Everything else no compile. Giving up on this. If something as simple as this is broken for years not wanting to see what other problems will come up. Ubuntu 18.04 server.
I'm not able to check right now if it works, but I think that this would be solved by replacing the device.js
module (not-existing anymore) for the current-device
module. It is from the same author.
So, in the project root, execute:
npm remove device.js
npm i --save current-device
Finally, in the file CordovaDeviceRouter.js use the new current-device
module instead of device.js
:
const deviceJs = require('current-device').default;
Port 6000 is a protected port used for other things as such can't be used for localhost.
The following are the restricted ports on chrome and considered unsafe so won't work for your use.
Source: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc
Maybe the same here...
I receive the following error when issuing the command
HOST="0.0.0.0" PORT="6000" npm run hot-dev
I followed the setup guide in the README, deviating only when installing the cordova browser. (I issued the command
cordova platform add browser
instead of the commandcordova platform add browser android
, because I was running into some issues there. Ultimately I got the Android platform installed anyway).OS:
Ubuntu 16.04.2 LTS (xenial)