-
Notifications
You must be signed in to change notification settings - Fork 36
Troubleshoot ROS installation
Below are a few tips for troubleshooting the installation of Realm Object Server.
If you are running on a system with too little memory, e.g. a 512MB droplet from Digital Ocean:
Killed ...] - extract:lodash: verb gentlyRm don't care about contents; nuking /root/.nvm/versions/node/v6.11.4/lib/node_modules/.staging/loda
You can either create a swap disk following (these instructions)[https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04], or run on a system with minimum 1GB ram.
We recommend to not install as root, but if you do you might get this error:
root@ubuntu-512mb-ros-test:~# npm install -g realm-object-server
/root/.nvm/versions/node/v6.11.4/bin/ros -> /root/.nvm/versions/node/v6.11.4/lib/node_modules/realm-object-server/dist/cli.js
> lzma-native@3.0.1 install /root/.nvm/versions/node/v6.11.4/lib/node_modules/realm-object-server/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
sh: 1: node-pre-gyp: Permission denied
/root/.nvm/versions/node/v6.11.4/lib
└── (empty)
This is solved by adding --unsafe-perm
to the install command like this:
npm install -g realm-object-server --unsafe-perm
root@ubuntu-512mb-lon1-01-BM-TEST:~# ros start
module.js:471
throw err;
^
Error: Cannot find module '/root/.nvm/versions/node/v6.11.4/lib/node_modules/realm-object-server/node_modules/realm/compiled/node-v48_linux_x64/realm.node'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/root/.nvm/versions/node/v6.11.4/lib/node_modules/realm-object-server/node_modules/realm/lib/index.js:96:28)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
The root cause of this can be due to previous failed installations (like above). Continuing a npm install
after a failed attempt might leave the installation in a state that can't be gracefully recovered with a new npm install
. The solution is to uninstall before retrying the install with npm uninstall -g realm-object-server
before retrying the installation.