firebase functions fails to deploy - firebase

I am having issues in trying to deploy firebase functions. If i try to do firebase -deploy i end up with below error. I am using windows 10 and git bash to run this. my firebase version: 3.19.3 npm -v: 6.2.0
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\vikce\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\vikce\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\vikce\\OneDrive\\Documents\\moblizeIt\\moblizeit-bots-offering\\mit-bots\\functions\\node_modules\\firebase-admin\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\vikce\\OneDrive\\Documents\\moblizeIt\\moblizeit-bots-offering\\mit-bots\\functions\\node_modules\\firebase-admin\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64"
gyp ERR! cwd C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc
gyp ERR! node -v v8.10.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 'C:\Program Files\nodejs\node.exe C:\Users\vikce\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64\grpc_node.node --module_name=grpc_node --module_path=C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\vikce\\OneDrive\\Documents\\moblizeIt\\moblizeit-bots-offering\\mit-bots\\functions\\node_modules\\firebase-admin\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc
node-pre-gyp ERR! node -v v8.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\vikce\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64\grpc_node.node --module_name=grpc_node --module_path=C:\Users\vikce\OneDrive\Documents\moblizeIt\moblizeit-bots-offering\mit-bots\functions\node_modules\firebase-admin\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.6.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.6.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\vikce\AppData\Roaming\npm-cache\_logs\2018-07-23T15_07_00_437Z-debug.log

Make sure that you are logged in to firebase
firebase login
Then do
firebase use --add
When inside the folder try
firebase deploy --only functions
This is instead of trying to deploy the whole file you can target the functions.

Related

I get this error while installing canvas package

npm ERR! code 1
npm ERR! path C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\better-sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || npm run build-release
npm ERR! > better-sqlite3#7.5.0 build-release
npm ERR! > node-gyp rebuild --release
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=17.4.0 runtime=node arch=ia32 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#17.4.0 | win32 | ia32
npm ERR! gyp info find Python using Python version 3.9.10 found at "C:\Users\Thiyagarajayan.R\AppData\Local\Programs\Python\Python39-32\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v17.4.0/node-v17.4.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.4.0/node-v17.4.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v17.4.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v17.4.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v17.4.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v17.4.0/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.4.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v17.4.0/win-x86/node.lib
npm ERR! gyp http 404 https://\nodejs.org/download/release/v17.4.0/win-arm64/node.lib#
npm ERR! gyp http 200 https://\nodejs.org/download/release/v17.4.0/win-x64/node.lib#
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://\github.com/nodejs/node-gyp#on-windows#
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:406:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Windows_NT 6.3.9600
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\Users\Thiyagarajayan.R\Desktop\Tiga\node_modules\better-sqlite3
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Thiyagarajayan.R\AppData\Local\npm-cache_logs\2022-02-08T13_09_38_183Z-debug-0.log

issue installing node-red-node-sqlite

I am trying to install a "node-red-node-sqlite" using node-red UI on a virtual machine that has proxy setting, it throws error message. I am able to install other nodes on VM.
i have installed python v2.7.6; nodejs v10.16.3; npm 6.9.0 ; nvm v1.1.7 on VM; I have similar setup on my desktop (npm v6.11.3) and it works fine; but on the VM which is in another data-center and has proxy setting, It node-sqlite installation failes
I am following the steps
1. npm i --unsafe-perm node-red-node-sqlite
2. cd ~/.node-red
3. npm rebuild
But step-1 given me error as given below
PS C:\Users\userid.node-red> npm i --unsafe-perm
node-red-node-sqlite
> sqlite3#4.1.0 install C:\Users\userid\.node-red\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.0 and node#10.16.3 (node-v64 ABI, unknown) (falling back
to source compile with node-gyp) node-pre-gyp WARN Hit error
getaddrinfo ENOTFOUND mapbox-node-binary.s3.amazonaws.com
mapbox-node-binary.s3.amazonaws.com:443 gyp WARN install got an
error, rolling back install gyp ERR! configure error gyp ERR! stack
Error: This is most likely not a problem with node-gyp or the
package itself and gyp ERR! stack is related to network
connectivity. In most cases you are behind a proxy or have bad gyp
ERR! stack network settings. gyp ERR! stack at
Request.<anonymous>
(C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\lib\install.js:197:21) gyp ERR! stack at Request.emit (events.js:198:13) gyp ERR! stack
at Request.onRequestError
(C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\request\request.js:881:8)
gyp ERR! stack at ClientRequest.emit (events.js:198:13) gyp ERR!
stack at TLSSocket.socketErrorListener (_http_client.js:392:9)
gyp ERR! stack at TLSSocket.emit (events.js:198:13) gyp ERR!
stack at emitErrorNT (internal/streams/destroy.js:91:8) gyp ERR!
stack at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
gyp ERR! stack at process._tickCallback
(internal/process/next_tick.js:63:19) gyp ERR! System Windows_NT
10.0.14393 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\nvm\\v10.16.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build"
"--module=C:\\Users\\userid\\.node-red\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64\\node_sqlite3.node"
"--module_name=node_sqlite3"
"--module_path=C:\\Users\\userid\\.node-red\\node_modules\\sqlite3\\lib\\binding\\node-v64-win32-x64"
"--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v64" gyp ERR! cwd
C:\Users\userid\.node-red\node_modules\sqlite3 gyp ERR! node -v
v10.16.3 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
'C:\Program Files\nodejs\node.exe
C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-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>
(C:\Users\userid\.node-red\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
Windows_NT 10.0.14393 node-pre-gyp ERR! command "C:\\Program
Files\\nodejs\\node.exe"
"C:\\Users\\userid\\.node-red\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp"
"install" "--fallback-to-build" node-pre-gyp ERR! cwd
C:\Users\userid\.node-red\node_modules\sqlite3 node-pre-gyp ERR!
node -v v10.16.3 node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok Failed to execute 'C:\Program
Files\nodejs\node.exe
C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Users\userid\.node-red\node_modules\sqlite3\lib\binding\node-v64-win32-x64
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3#4.1.0 install: `node-pre-gyp install
--fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3#4.1.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\userid\AppData\Roaming\npm-cache\_logs\2019-10-21T15_57_41_109Z-debug.log
PS C:\Users\userid\.node-red>
=======================
When I try to install the "npm install --global --production windows-build-tools" I get error =>
4115 verbose stack Error: windows-build-tools#5.2.2 postinstall: `node ./dist/index.js`
4115 verbose stack Exit status 1
4115 verbose stack at EventEmitter.<anonymous> (C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
4115 verbose stack at EventEmitter.emit (events.js:198:13)
4115 verbose stack at ChildProcess.<anonymous> (C:\ProgramData\nvm\v10.16.3\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
4115 verbose stack at ChildProcess.emit (events.js:198:13)
4115 verbose stack at maybeClose (internal/child_process.js:982:16)
4115 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
4116 verbose pkgid windows-build-tools#5.2.2
4117 verbose cwd C:\windows\system32\windowspowershell\v1.0

Meteor throws gyp error when I try to run npm install

When I run npm install on a meteor package I downloaded from coursera, I get the below error. Problem is I don't even understand what its talking about. Any pointers would be appreciated.
=> A patch (Meteor 1.4.4.6) for your current release is available!
Update this project now with 'meteor update --patch'.
Started MongoDB.
Errors prevented startup:
While loading package npm-bcrypt#0.8.6_3:
error: Command failed: C:\Users\Chidimma\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\bin\npm.cmd rebuild --update-binary
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Chidimma\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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 Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\bin\\node.exe" "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Chidimma\AppData\Local\.meteor\packages\npm-bcrypt\0.8.6_3\npm\node_modules\.temp-izvog2\node_modules\bcrypt
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\bin\\node.exe" "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js" "rebuild" "--update-binary"
npm ERR! node v4.6.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.6 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 bcrypt 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 bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Chidimma\AppData\Local\.meteor\packages\npm-bcrypt\0.8.6_3\npm\node_modules\.temp-izvog2\npm-debug.log
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Chidimma\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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 Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\bin\\node.exe" "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Chidimma\AppData\Local\.meteor\packages\npm-bcrypt\0.8.6_3\npm\node_modules\.temp-izvog2\node_modules\bcrypt
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\bin\\node.exe" "C:\\Users\\Chidimma\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2_3\\mt-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js" "rebuild" "--update-binary"
npm ERR! node v4.6.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! bcrypt#0.8.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#0.8.6 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 bcrypt 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 bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Chidimma\AppData\Local\.meteor\packages\npm-bcrypt\0.8.6_3\npm\node_modules\.temp-izvog2\npm-debug.log
Your application has errors. Waiting for file change.

Algolia-Error: Cannot find module 'firebase'

Im following algolia documents.
https://www.algolia.com/doc/tutorials/indexing/3rd-party-service/firebase-algolia/
I did every step that document tell me to do.But It gives me error.
internal/modules/cjs/loader.js:589
throw err;
^
Error: Cannot find module 'firebase'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:15)
at Function.Module._load (internal/modules/cjs/loader.js:513:25)
at Module.require (internal/modules/cjs/loader.js:643:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/ali/Desktop/algolia/index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
How to fix it?
this is what i got when i tried to install firebase module with npm.
error:
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.16.0/node-v67-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc#1.16.0 and node#11.1.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/lib/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/lib/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/lib/node_modules/node-gyp/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/lib/node_modules/node-gyp/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:161:21)
gyp ERR! System Linux 4.19.2-1-MANJARO
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/ali/Desktop/algolia/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/ali/Desktop/algolia/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /home/ali/Desktop/algolia/node_modules/grpc
gyp ERR! node -v v11.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 '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/ali/Desktop/algolia/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/ali/Desktop/algolia/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> (/home/ali/Desktop/algolia/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:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
node-pre-gyp ERR! System Linux 4.19.2-1-MANJARO
node-pre-gyp ERR! command "/usr/bin/node" "/home/ali/Desktop/algolia/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/ali/Desktop/algolia/node_modules/grpc
node-pre-gyp ERR! node -v v11.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/ali/Desktop/algolia/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/ali/Desktop/algolia/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=3 --node_abi_napi=napi' (1)
npm WARN algolia#1.0.0 No description
npm WARN algolia#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.16.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.16.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! /home/ali/.npm/_logs/2018-11-23T17_32_22_514Z-debug.log
Try using command npm-install firebase.
It will come up with message firebase install with version.
After that go to package.Json under dependencies add "firebase":"version number". This will solve your issue.

meteor add momentjs:moment failing

I cannot get momentjs added to my Meteor project. I am presented with the following output but I do not know how to fix. App runs fine with momentjs removed from the packages file. Any suggestions?
=> Errors prevented startup:
While loading package momentjs:moment#2.15.2:
error: Command failed:
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\bin\npm.cmd
rebuild --update-binary
node-pre-gyp ERR! Tried to download:
https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node
-v46-win32-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.0.14 and
node#4.6.1 (node-v46 ABI) (falling back to source compile with
node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable
"C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\python\python.exe",
you can set the PYTHON env variable.
gyp ERR! stack at failNoPython
(C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\lib\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\node-gyp\\bin\\node-gyp.js"
"configure" "--fallback-to-build"
"--module=C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\momentjs_mome
nt\\2.15.2\\npm\\node_modules\\.temp-mkvu1b\\node_modules\\fsevents\\lib\\bindin
g\\Release\\node-v46-win32-ia32\\fse.node"
"--module_name=fse"
"--module_path=C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\momentjs
_moment\\2.15.2\\npm\\node_modules\\.temp-mkvu1b\\node_modules\\fsevents\\lib\\b
inding\\Release\\node-v46-win32-ia32"
gyp ERR! cwd
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\node_modules\fsevents
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute
'C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\bin\node.exe
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.
2\npm\node_modules\.temp-mkvu1b\node_modules\fsevents\lib\binding\Release\node-v
46-win32-ia32\fse.node
--module_name=fse
--module_path=C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\
2.15.2\npm\node_modules\.temp-mkvu1b\node_modules\fsevents\lib\binding\Release\n
ode-v46-win32-ia32'
(1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous>
(C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\lib\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:829:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\node-pre-gyp\\bin\\node-pre-g
yp"
"install" "--fallback-to-build"
node-pre-gyp ERR! cwd
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\node_modules\fsevents
node-pre-gyp ERR! node -v v4.6.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js"
"rebuild" "--update-binary"
npm ERR! node v4.6.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! fsevents#1.0.14 install: `node-pre-gyp install
--fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents#1.0.14 install script 'node-pre-gyp
install --fallback-to-build'.
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 fsevents
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this
project with:
npm ERR! npm bugs fsevents
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fsevents
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\npm-debug.log
node-pre-gyp ERR! Tried to download:
https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node
-v46-win32-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.0.14 and
node#4.6.1 (node-v46 ABI) (falling back to source compile with
node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable
"C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\python\python.exe",
you can set the PYTHON env variable.
gyp ERR! stack at failNoPython
(C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\lib\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\node-gyp\\bin\\node-gyp.js"
"configure" "--fallback-to-build"
"--module=C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\momentjs_mome
nt\\2.15.2\\npm\\node_modules\\.temp-mkvu1b\\node_modules\\fsevents\\lib\\bindin
g\\Release\\node-v46-win32-ia32\\fse.node"
"--module_name=fse"
"--module_path=C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\momentjs
_moment\\2.15.2\\npm\\node_modules\\.temp-mkvu1b\\node_modules\\fsevents\\lib\\b
inding\\Release\\node-v46-win32-ia32"
gyp ERR! cwd
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\node_modules\fsevents
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute
'C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\bin\node.exe
C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.window
s.x86_32\dev_bundle\lib\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.
2\npm\node_modules\.temp-mkvu1b\node_modules\fsevents\lib\binding\Release\node-v
46-win32-ia32\fse.node
--module_name=fse
--module_path=C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\
2.15.2\npm\node_modules\.temp-mkvu1b\node_modules\fsevents\lib\binding\Release\n
ode-v46-win32-ia32'
(1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous>
(C:\Users\GA-PMC\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windo
ws.x86_32\dev_bundle\lib\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:829:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\node-pre-gyp\\bin\\node-pre-g
yp"
"install" "--fallback-to-build"
node-pre-gyp ERR! cwd
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\node_modules\fsevents
node-pre-gyp ERR! node -v v4.6.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\bin\\node.exe"
"C:\\Users\\GA-PMC\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.4.2\\mt
-os.windows.x86_32\\dev_bundle\\lib\\node_modules\\npm\\bin\\npm-cli.js"
"rebuild" "--update-binary"
npm ERR! node v4.6.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! fsevents#1.0.14 install: `node-pre-gyp install
--fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents#1.0.14 install script 'node-pre-gyp
install --fallback-to-build'.
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 fsevents
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this
project with:
npm ERR! npm bugs fsevents
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fsevents
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
C:\Users\GA-PMC\AppData\Local\.meteor\packages\momentjs_moment\2.15.2\npm\nod
e_modules\.temp-mkvu1b\npm-debug.log
Im sorry the file is so long but im not exactly sure where im looking for the error. Is it FS events or NodeJS? There seems to be older packages installed can I use these instead? How do I disable meteor from trying to get the latest version?
I had a similar issue running meteor 1.3.5.1 and moment 2.15.2
I fixed it by installing moment 2.15.1
meteor add momentjs:moment#=2.15.1
You need to install python. MDG made a change, so that each user needs to provide their own build chain tools, which means things like python, gyp etc.
So install python and try again, it should work for you

Resources