Installing parse server - node.js

I'm unable to install Parse Server.
sudo npm install -g parse-server
/usr/local/bin/parse-server -> /usr/local/lib/node_modules/parse-server/bin/parse-server
> bcrypt#1.0.2 install /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt#1.0.2 and node#4.7.2 (node-v46 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/archie/.node-gyp/4.7.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/build'
make: *** No rule to make target '../.node-gyp/4.7.2/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/build'
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/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.10.0-24-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding"
gyp ERR! cwd /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
gyp ERR! node -v v4.7.2
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/bin/nodejs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:854:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
node-pre-gyp ERR! System Linux 4.10.0-24-generic
node-pre-gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/parse-server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/parse-server/node_modules/bcrypt
node-pre-gyp ERR! node -v v4.7.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/parse-server/node_modules/bcrypt/lib/binding' (1)
How to fix
ode-pre-gyp ERR! Tried to download(404):
https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
?

to install parse server please type:
npm install -g parse-server mongodb-runner
After if you want to run it locally:
# mongodb-runner start
# parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test

Related

how can I fix npm install sqlite3 fail?

I am using windows sub linux (ubuntu) for my project and tried to install sqlite3 using npm install sqlite3
Here is my error:
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
> sqlite3#5.0.1 install /mnt/c/Users/window/Documents/IEEE-Website/backend/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 Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.1 and node#14.15.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/build'
make: Warning: File 'Makefile' has modification time 0.00041 s in the future
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3320300/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3320300/sqlite3.c] Error 127
make: Leaving directory '/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/build'
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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 4.19.128-microsoft-standard
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
gyp ERR! cwd /mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.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 build --fallback-to-build --module=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 4.19.128-microsoft-standard
node-pre-gyp ERR! command "/usr/local/bin/node" "/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.15.1
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 build --fallback-to-build --module=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/mnt/c/Users/window/Documents/IEEE-Website/backend/node_modules/sqlite3/lib/binding/napi-v6-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3#5.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#5.0.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/rkim964/.npm/_logs/2021-02-05T00_40_18_352Z-debug.log
Is there any idea I can fix this?
I have tried to delete package-lock.json and node_module and did npm install again but doesn't work for me.
Addition to this I have run node-pre-gyp install --fallback-to-build
the result was
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#0.10.2
node-pre-gyp info using node#10.19.0 | linux | x64
node-pre-gyp info build requesting source compile
gyp info it worked if it ends with ok
gyp info using node-gyp#6.1.0
gyp info using node#10.19.0 | linux | x64
gyp info ok
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack Error: backend package.json is not node-pre-gyp ready:
node-pre-gyp ERR! stack package.json must declare these properties:
node-pre-gyp ERR! stack main
node-pre-gyp ERR! stack binary.module_name
node-pre-gyp ERR! stack binary.module_path
node-pre-gyp ERR! stack binary.host
node-pre-gyp ERR! stack at validate_config (/usr/lib/nodejs/node-pre-gyp/lib/util/versioning.js:220:15)
node-pre-gyp ERR! stack at Object.module.exports.evaluate (/usr/lib/nodejs/node-pre-gyp/lib/util/versioning.js:279:5)
node-pre-gyp ERR! stack at handle_gyp_opts (/usr/lib/nodejs/node-pre-gyp/lib/util/handle_gyp_opts.js:59:27)
node-pre-gyp ERR! stack at configure (/usr/lib/nodejs/node-pre-gyp/lib/configure.js:12:5)
node-pre-gyp ERR! stack at /usr/lib/nodejs/node-pre-gyp/lib/build.js:43:13
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/nodejs/node-pre-gyp/lib/util/compile.js:85:9)
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.19.128-microsoft-standard
node-pre-gyp ERR! command "/usr/bin/node" "/usr/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /mnt/c/Users/window/Documents/IEEE-Website/backend
node-pre-gyp ERR! node -v v10.19.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.2
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>
This is what I have got
i actually found the solution. It is sudo apt-get install python-is-python3. As ubuntu devide python as python2 and python3 command so you need map the python to python3 which sudo apt-get install python-is-python3 does it for ubuntu user

node-pre-gyp ERR! and gyp ERR! handling?

I am trying to build a big project using yarn and I get a lot of errors in the form of node-pre-gyp ERR! and gyp ERR!
The errors are bellow:
22 warnings and 11 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
22 warnings and 11 errors generated.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit(/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/no de-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/Cellar/node/12.3.1/bin/node\" \"/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/x/Desktop/p-w/p-r/node_modules/fsevents
gyp ERR! node -v v12.3.1
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 'node-gyp build --fallback-to-build --module=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/x/Desktop/p-w/p-r/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:200:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/12.3.1/bin/node\" \"/Users/x/Desktop/p-w/p-r/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/x/Desktop/p-w/p-r/node_modules/fsevents
node-pre-gyp ERR! node -v v12.3.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
make: *** [Release/obj.target/fse/fsevents.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/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/Cellar/node/12.3.1/bin/node\" \"/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/x/Desktop/p-w/p-r/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/x/Desktop/p-w/p-r/node_modules/fsevents
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok"
What may be the causes of that?
there might be some dependence issue, try
npm rebuild
if not success, try to remove package-lock.json, node_modules, install again
rm -rf node_modules && rm package-lock.json && npm install
same issue
Remove package-lock.json and node_modules. Run
npm install

Firebase installation error with "Pre-built binaries not found for grpc#1.19.0 and node#12.1.0"

I am trying to install firebase on my MacBook, and is getting the following error.
$ npm install -g firebase
> grpc#1.19.0 install /Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc#1.19.0 and node#12.1.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:304:12)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1000:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/Users/satoshi/.nvm/versions/node/v12.1.0/bin/node" "/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc
gyp ERR! node -v v12.1.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 '/Users/satoshi/.nvm/versions/node/v12.1.0/bin/node /Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:196:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1000:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
node-pre-gyp ERR! System Darwin 18.5.0
node-pre-gyp ERR! command "/Users/satoshi/.nvm/versions/node/v12.1.0/bin/node" "/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/satoshi/.nvm/versions/node/v12.1.0/bin/node /Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/satoshi/.nvm/versions/node/v12.1.0/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.19.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.19.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! /Users/satoshi/.npm/_logs/2019-04-30T20_15_40_148Z-debug.log
I have npm (6.9.0) and node (12.1.0). It looks like a type of version mismatch, but I am not able to find out how to fix this issue.
The problem here is that grpc 1.19.0 is not compatible with Node 12. Version 1.20.2 of grpc is compatible with Node 12, so if Firebase updates their dependency that will also fix the problem.
This work for me:
install nvm from https://github.com/nvm-sh/nvm
switch to node version : v10.15.3

Trying to install grpc-node locally

I'm trying to install grpc locally via npm install, and command I used was sudo npm i grpc --unsafe-perm. I get an error, and I'm not sure what I'm doing wrong. I'm on linux, ubuntu 18.04.1. I have node v11 and npm v6.4.1.
Here is the error log:
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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.15.0-38-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc
gyp ERR! node -v v11.0.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 build --fallback-to-build --library=static_library --module=/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-app/node_modules/grpc/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 Linux 4.15.0-38-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/media/binyamin/Seagate Expansion Drive/Documents/GitHub/admin-
app/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--
fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /media/binyamin/Seagate Expansion
Drive/Documents/GitHub/admin-app/node_modules/grpc
node-pre-gyp ERR! node -v v11.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok

npm opencv installation fail in mac?

I am trying to install opencv for vehicle detection in realtime. While installing opencv in terminal it always fail to install
Parameshs-MacBook-Air:pyrky_nodejs parameshv$ npm install opencv --save
opencv#6.0.0 install /Users/parameshv/pyrky_nodejs/node_modules/opencv
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for opencv#6.0.0 and node#10.8.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for opencv#6.0.0 and node#10.8.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
CXX(target) Release/obj.target/opencv/src/init.o
CXX(target) Release/obj.target/opencv/src/init.o
sed: ./Release/.deps/Release/obj.target/opencv/src/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/opencv/src/init.o] Error 1
CXX(target) Release/obj.target/opencv/src/Matrix.o
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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/parameshv/pyrky_nodejs/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:249:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/Users/parameshv/pyrky_nodejs/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
node-pre-gyp ERR! node -v v10.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.8.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64' (1)
npm WARN opencv#6.0.0 had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions.
npm WARN pyrky#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv#6.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv#6.0.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! /Users/parameshv/.npm/_logs/2018-09-04T05_34_09_181Z-debug.log
Parameshs-MacBook-Air:pyrky_nodejs parameshv$
Parameshs-MacBook-Air:pyrky_nodejs parameshv$
Parameshs-MacBook-Air:pyrky_nodejs parameshv$ ../src/Matrix.cc:2:10: fatal error: 'Matrix.h' file not found
include "Matrix.h"
^~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/opencv/src/Matrix.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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/parameshv/pyrky_nodejs/node_modules/opencv/build/opencv/v6.0.0/Release/node-v64-darwin-x64"
gyp ERR! cwd /Users/parameshv/pyrky_nodejs/node_modules/opencv
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Tried to fix this installing
brew tap brewsci/science
brew install pkg-config opencv#2
brew link opencv#2 --force
npm install opencv --save
How to install opencv npm in mac os? Any help much appreciates pls....

Resources