unable to install realm on linux for react-native - react-native

Unable to install the realm for react-native. It always gives some error irrespective of the different commands i use to install it. It always gives some version mis-match error.
when trying to install using - sudo npm install --save realm --target=7.10.0
Getting following error
> lzma-native#3.0.3 install /home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.org/lzma-native/lzma_native-v3.0.3-node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native#3.0.3 and node#7.10.0 (node-v51 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.org/lzma-native/lzma_native-v3.0.3-node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native#3.0.3 and node#7.10.0 (node-v51 ABI, glibc) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/build'
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64"
gyp ERR! cwd /home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native
gyp ERR! node -v v7.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 3.13.0-32-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native
node-pre-gyp ERR! node -v v7.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64' (1)
gyp ERR! configure error stall: info lifecycle lzma-native#3.0.3~install: Faile
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/build'
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native/binding-v3.0.3-node-v51-linux-x64"
gyp ERR! cwd /home/ambujeshtripathi/React-Project/DM/LMSReactNative/node_modules/lzma-native
gyp ERR! node -v v7.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN react-native-drawer-layout#1.3.2 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-drawer-layout#1.3.2 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-drawer-layout-polyfill#1.3.2 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-push-notification#3.0.1 requires a peer of react-native#>=0.33 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#0.0.70 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#0.0.70 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation#1.0.0-beta.13 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation#1.0.0-beta.13 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#0.0.69 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#0.0.69 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-test-renderer#16.0.0-alpha.12 requires a peer of react#^16.0.0-alpha.12 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native#3.0.3 install: `node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native#3.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ambujeshtripathi/.npm/_logs/2017-11-27T05_43_48_055Z-debug.log

I solve it by typing:
sudo -s
and then:
sudo npm install --save realm

Related

Cannot install tileserver-gl using npm

I am trying to install tileserver to create raster tiles offline. When i tried to install tileserver using npm, I get the following error:
$ sudo npm install -g tileserver-gl
/usr/local/bin/tileserver-gl -> /usr/local/lib/node_modules/tileserver-gl/src/main.js
> sqlite3#4.1.1 install /usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3
> 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 sqlite3#4.1.1 and node#10.16.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/ash/.cache/node-gyp/10.16.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/.node-gyp'
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.4.0-18362-Microsoft
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3
node-pre-gyp ERR! node -v v10.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/tileserver-gl/node_modules/sqlite3/lib/binding/node-v64-linux-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN notsup Unsupported engine for tileserver-gl#2.5.0: wanted: {"node":">=6 <7"} (current: {"node":"10.16.0","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: tileserver-gl#2.5.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3#4.1.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#4.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ash/.npm/_logs/2019-12-19T06_26_16_494Z-debug.log
I tried the code below, it says Error: Cannot find module 'graceful-fs'
$sudo node-gyp rebuild -g --unsafe-perm
I tried downloading graceful-fs, it still gives the same error.
It is an issue with node permissions, try this:
Back up your computer. On the command line, in your home directory, create a directory for global installations:
mkdir ~/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
In your preferred text editor, open or create a
~/.profile
file and add this line:
export PATH=~/.npm-global/bin:$PATH
On the command line, update your system variables:
source ~/.profile
To test your new configuration, install a package globally without using sudo

How do I install ffmpeg-binaries without the following error message?

I am trying to install ffmpeg-libraries, however, get the same error message every time.
I am trying to code a music bot for discord.js and require ffmpeg-libraries. I have tried reinstalling node.js (I am on the current stable version).
Louiss-MBP-2:backslashmoderation louisglen$ sudo npm i ffmpeg-binaries
Password:
lzma-native#3.0.8 install /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build
node-pre-gyp ERR! Tried to download(undefined): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v3.0.8-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for lzma-native#3.0.8 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64"
gyp ERR! cwd /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64/lzma_native.node --module_name=lzma_native --module_path=/Users/louisglen/Desktop/Discordjs/BackslashModeration/node_modules/lzma-native/binding-v3.0.8-node-v64-darwin-x64' (1)
npm WARN discord.js#11.4.2 requires a peer of bufferutil#^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of erlpack#discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of node-opus#^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of opusscript#^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of sodium#^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js#11.4.2 requires a peer of uws#^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN backslashmoderation#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native#3.0.8 install: `node-pre-gyp install --fallback-to-build && node node_modules/rimraf/bin.js build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native#3.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/louisglen/.npm/_logs/2019-01-19T07_20_01_082Z-debug.log
Louiss-MBP-2:backslashmoderation louisglen$
I would expect that installs correctly, however, does not.
I think it there might be errors with the latest FFmpeg-binaries, I installed a prev version and it worked for me.
$ npm i ffmpeg-binaries#3.2.2-3

Can not install Realm for my React Native App

I am trying to install Realm for my React native app and I get the following error, could you suggest what might be wrong.
I am using the command
npm install --save realm
from the web - https://realm.io/docs/javascript/latest/
Error:
npm ERR! Failed at the realm#2.11.0 install script.
I have tried to install
npm install -g node-pre-gyp
and
npm install -g node-gyp
Still did not work. any suggestions would be very helpful
Thanks
R
here is my log
npm install --save realm
> realm#2.11.0 install C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/2.11.0/realm-v2.11.0-node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for realm#2.11.0 and node#10.1.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:165:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Development\\abcd-Retail-ReactNative\\retail-native-app\\node_modules\\realm\\compiled\\node-v64_win32_x64\\realm.node" "--module_name=realm" "--module_path=C:\\Development\\abcd-Retail-ReactNative\\retail-native-app\\node_modules\\realm\\compiled\\node-v64_win32_x64"
gyp ERR! cwd C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build --module=C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm\compiled\node-v64_win32_x64\realm.node --module_name=realm --module_path=C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm\compiled\node-v64_win32_x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:957:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Development\\abcd-Retail-ReactNative\\retail-native-app\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm
node-pre-gyp ERR! node -v v10.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm\compiled\node-v64_win32_x64\realm.node --module_name=realm --module_path=C:\Development\abcd-Retail-ReactNative\retail-native-app\node_modules\realm\compiled\node-v64_win32_x64' (1)
npm WARN eslint-plugin-react-native#3.2.1 requires a peer of eslint#^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native#0.55.4 requires a peer of react#16.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-looped-carousel#0.1.13 requires a peer of react-native#^0.54.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm#2.11.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm#2.11.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rao\AppData\Roaming\npm-cache\_logs\2018-06-28T14_42_35_122Z-debug.log
Thanks #Ashwin Mothilal, I had to go back to a stable version of Node (v8.11.3). How I did it.
It took a while to figure out the entire procedure, writing down the steps I performed. Hope this helps
1 - Uninstalled Node.js completely from my machine. (Windows)
Followed this link - [How to completely remove node.js from Windows
(Dont forget to restart your PC)
2 - Downloaded and Installed the stable version (8.11.3 LTS) from -
[https://nodejs.org/en/][1]
3 - Restart your machine.
4 - Check the node version now (>> node -v).
5 - In your project remove all node_modules -
rm -rf node_modules/
npm install
link -
[How to clean node_modules folder of packages that are not in package.json?
6 - then do - >>npm install in your project.
This should install all the required dependencies.
7 - Now install Realm.
npm install --save realm
This has successfully added Realm to my project.
Note:
When I was getting this errors which I have posted in my actual question, It recommended me to install 'node-pre-gyp'.
I tried to install
npm install --save node-pre-gyp --fallback-to-build
npm install --save node-pre-gyp
npm install -g node-pre-gyp
Which did not work, so Before I did the steps provided above I have removed 'node-pre-gyp'. In case you have installed any of the above you can please remove them as it was not required.
Hope this helps.
R
1) First Check Node version using below command
node -v
v10.16.0
If Version is not match with 10.16.0 than install node using below link
https://nodejs.org/en/download/
and install node 10.16.0
Install realm using below command
npm install --save realm
Realm install successfully.!!!

Trying to install truffle on Windows 10 by "$npm install - g truffle" Got a bunch of problems

$ npm install -g truffle
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install th e latest version of pug instead of jade
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
scrypt#6.0.3 preinstall C:\Users\Zachary Zhong\AppData\Roaming\npm\node_module s.staging\scrypt-b6fa2906
node node-scrypt-preinstall.js
C:\Users\Zachary Zhong\AppData\Roaming\npm\truffle -> C:\Users\Zachary Zhong\App Data\Roaming\npm\node_modules\truffle\cli.js
C:\Users\Zachary Zhong\AppData\Roaming\npm\truffle-exec -> C:\Users\Zachary Zhon g\AppData\Roaming\npm\node_modules\truffle\exec.js
scrypt#6.0.3 install C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\t ruffle\node_modules\scrypt
node-gyp rebuild
C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\truffle\node_modules\scr ypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modul es\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Warning: Missing input files:
C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\truffle\node_modules\scr ypt\build..\scrypt\win\include\config.h
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
The system cannot find the file specified.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\truffle \node_modules\scrypt\build\copied_files.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\truffle \node_modules\scrypt\build\scrypt_wrapper.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Zachary Zhong\AppData\Roaming\npm\node_modules\truffle\nod e_modules\scrypt
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
C:\Users\Zachary Zhong\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\truffle\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "truffle"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! scrypt#6.0.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 install script 'node-gyp rebuild'.
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 scrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs scrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls scrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Zachary Zhong\npm-debug.log
npm ERR! code 1
I've got 2 guides for installing on Windows:
Installing on Windows 10 using Ubuntu bash (preferred)
https://davidburela.wordpress.com/2017/05/12/how-to-install-truffle-testrpc-on-ubuntu-or-windows-10-with-windows-subsystem-for-linux/
Installing on Windows
https://davidburela.wordpress.com/2016/11/18/how-to-install-truffle-testrpc-on-windows-for-blockchain-development/
Given that you have not include any details about your dev environment, see this StackOverflow thread that discusses the same problem as yours: node gyp error TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified

Error installing vcremote on Mac OS X 10.11

I am trying to install vcremote with 'sudo npm install -g --unsafe-perm vcremote' but getting below error:
/usr/local/bin/vcremote -> /usr/local/lib/node_modules/vcremote/bin/vcremote
> thread-sleep#1.0.4 install /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs'
node-pre-gyp ERR! stack at Function.Module._resolveFilename (module.js:472:15)
node-pre-gyp ERR! stack at Function.Module._load (module.js:420:25)
node-pre-gyp ERR! stack at Module.require (module.js:500:17)
node-pre-gyp ERR! stack at require (internal/module.js:20:19)
node-pre-gyp ERR! stack at evalmachine.<anonymous>:17:20
node-pre-gyp ERR! stack at Object.<anonymous> (/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
node-pre-gyp ERR! stack at Module._compile (module.js:573:32)
node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:582:10)
node-pre-gyp ERR! stack at Module.load (module.js:490:32)
node-pre-gyp ERR! stack at tryModuleLoad (module.js:449:12)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep
node-pre-gyp ERR! node -v v7.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.9
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
> node-ios-device#0.5.2 install /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
> node-gyp rebuild
CXX(target) Release/obj.target/node_module_version/src/node-module-version.o
LINK(target) Release/node_module_version
CXX(target) Release/obj.target/node_ios_device/src/ios-device.o
In file included from ../src/ios-device.cpp:8:
In file included from ../../nan/nan.h:182:
../../nan/nan_maybe_43_inl.h:221:17: warning: 'CloneElementAt' is deprecated [-Wdeprecated-declarations]
return array->CloneElementAt(GetCurrentContext(), index);
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:3056:36: note: 'CloneElementAt' has been explicitly marked deprecated here
MaybeLocal<Object> CloneElementAt(Local<Context> context,
^
In file included from ../src/ios-device.cpp:8:
In file included from ../../nan/nan.h:188:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:40:29: warning: 'New' is deprecated [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:4048:56: note: 'New' has been explicitly marked deprecated here
V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
^
In file included from ../src/ios-device.cpp:8:
../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../../nan/nan.h:1927:15: warning: 'SetAccessor' is deprecated [-Wdeprecated-declarations]
return obj->SetAccessor(
^
/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:2761:22: note: 'SetAccessor' has been explicitly marked deprecated here
bool SetAccessor(Local<Name> name,
^
3 warnings and 4 errors generated.
make: *** [Release/obj.target/node_ios_device/src/ios-device.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
/usr/local/lib
└── (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 (node_modules/vcremote/node_modules/thread-sleep):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep#1.0.4 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "--unsafe-perm=true" "vcremote"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! node-ios-device#0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-ios-device#0.5.2 install script 'node-gyp rebuild'.
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 node-ios-device package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-ios-device
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-ios-device
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Sibridge/npm-debug.log
npm ERR! code 1
I have already tried uninstalling and reinstalling node-gyp, but it didn't work.
How to fix it?
It looks like a bug has been filed with Microsoft (see https://connect.microsoft.com/VisualStudio/Feedback/Details/3110480). It appears that this is an issue with an outdated dependency that doesn't work with newer (>6.5) versions of node.
There are detailed steps to how to manually update the dependency at
https://social.msdn.microsoft.com/Forums/vstudio/en-US/77545f82-6f66-47d6-b00c-02d73089cb00/installing-vcremote?forum=vcgeneral.
You need to update the ioslib dependency to 1.0.3 and the node-ios-device to 1.1.0. That worked for me. Downgrading to node 6.5 might work as well.