Realm is the object oriented database management system. It is an amazing alternative for SQLite and Core data. It also provides seamless integration with your local database to its cloud storage. You can visit their official website and find yourself. Their query speed is amazing. While installing the realm in the react native application it gives an error as
1 2 3 4 5 6 7 8 9 10 |
> realm@2.18.0 install /home/yashinshekh/Documents/attendance-tracker/node_modules/realm > node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for realm@2.18.0 and node@10.11.0 (node-v57 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/home/yashinshekh/Documents/attendance-tracker/node_modules/realm/compiled' gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/yashinshekh/Documents/attendance-tracker/node_modules/realm/build' gyp ERR! System Linux 4.15.0-36-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/yashinshekh/Documents/attendance-tracker/node_modules/realm/compiled/node-v57_linux_x64/realm.node" "--module_name=realm" "--module_path=/home/yashinshekh/Documents/attendance-tracker/node_modules/realm/compiled/node-v57_linux_x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" |
But as in the error its not about the permission issue. At the time of writing this post , node version 10.x.x is not compatible with the latest version of realm 2.18.x . So first downgrade your node version to 8.x.x
1 2 |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs |
Once installed node version 8.x.x provide the –allow-perm=true –allow-root=true additional params with the npm save command
1 |
sudo npm install realm --allow-root=true --unsafe-perm=true |
It will going to save realm in your local node_modules. Hope it helps.