realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

ROS 2.0 Server start fails #305

Closed Damnum closed 6 years ago

Damnum commented 6 years ago

Goals

Installed the server on DigitalOcean 1 GB memory Ubuntu 16.04 as described here: https://realm.io/docs/realm-object-server/latest/#install-realm-object-server

Created project using ros init MyServer Tried to start the server using npm start

Expected Results

Server starts.

Actual Results

Server fails to start with this error:

Error: Cannot find module '/root/MyServer/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/Ling/node_modules/realm/lib/index.js:102: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)

npm ERR! Linux 4.4.0-98-generic
npm ERR! argv "/root/.nvm/versions/node/v6.11.4/bin/node" "/root/.nvm/versions/node/v6.11.4/bin/npm" "start"
npm ERR! node v6.11.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! my-ros-app@1.0.0 start: `npm run build && node dist/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the my-ros-app@1.0.0 start script 'npm run build && node dist/index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-ros-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && node dist/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs my-ros-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls my-ros-app
npm ERR! There is likely additional logging output above.

Tried it with both Node 6.11.4 (as recommended in the docs) and the latest 8.9.1.

Version of Realm and Tooling

Damnum commented 6 years ago

Turns out my installation was not correct. I had to activate swap space before installing ROS: https://stackoverflow.com/a/32444643/888881