Facing error in installing shards-react using npm - reactjs

When I am trying to install shards-react using npm i shards-react I am getting the error below:-
npm WARN deprecated axios#0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated iltorb#2.4.5: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb
> iltorb#2.4.5 install E:\Web Development\PUNEET PUGALIA\Marketplace-tokuten\node_modules\iltorb
> node ./scripts/install.js || node-gyp rebuild
info looking for cached prebuild # C:\Users\Themachilles\AppData\Roaming\npm-cache\_prebuilds\ee308d-iltorb-v2.4.5-node-v83-win32-x64.tar.gz
http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-win32-x64.tar.gz
http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-win32-x64.tar.gz
WARN install No prebuilt binaries found (target=14.16.0 runtime=node arch=x64 libc= platform=win32)
E:\Web Development\PUNEET PUGALIA\Marketplace-tokuten\node_modules\iltorb>if not defined npm_config_node_gyp (node "C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Users\Themachilles\AppData\Roaming\nvm\v14.16.0\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Themachilles\\AppData\\Roaming\\nvm\\v14.16.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Web Development\PUNEET PUGALIA\Marketplace-tokuten\node_modules\iltorb
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.1 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
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! iltorb#2.4.5 install: `node ./scripts/install.js || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb#2.4.5 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\Themachilles\AppData\Roaming\npm-cache\_logs\2021-04-19T14_04_18_940Z-debug.log
Please help about how can I resolve it and how can I intsall shards-react. I am mostly getting error with installing iltorb. But when I am using zlib module still then its not installing as well I am getting the same error there as well.

Change this line in package.json to:
"shards-react": "darizabalo/shards-react#master",
or
Steps to resolve:
Install Visual Studio Community
After installation run Visual Studio Installer
Select Modify option on your current Visual Studio Installation
Select and install Desktop Develmopment with C++ Workload with default options
After that npm i shards-react works with no problems

Related

Why do I get npm install massive error in this repo

I want to use this react-file-viewer but I can't get it running. When I do npm install I get massive error. I'm new to this.
My Node version is v16.9.1
This project is old and created for an older Node version I think so it's so many errors I don't know where to begin. Do you think it can work if I update all package.json dependencies to the newest version?
PS C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master> npm install
npm WARN deprecated babel-preset-es2015#6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated eslint-loader#1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated html-webpack-plugin#2.30.1: out of support
npm WARN deprecated sane#2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated svgo#0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js#2.6.12: core-js#<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\user\\Downloads\\react-file-viewer-master (1)\\react-file-viewer-master\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.9.1 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Python39\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\Downloads\\react-file-viewer-master (1)\\react-file-viewer-master\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.9.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2021-12-25T08_40_04_195Z-debug.log
PS C:\Users\user\Downloads\react-file-viewer-master (1)\react-file-viewer-master>
Highlighting a few error lines from your error log
npm ERR! gyp verb checks python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
and
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
What this simply means is, the process is looking for the Python v2.x and not able to find one. So, the further proceed with Python v3.9 which you have on your computer. But, then they hit the print statement which is not valid in Python v3.x (but valid in Python v2.x)
You can either do
Install Python v2.x (side-by-side with Python v3.x).
Update the node-sass (which you already did as I saw in one of your comments).
Looks like issue with Python.
Can you run below and check if it helps,
npm install express
Else, try below
delete node_modulesfolder
run npm install --global windows-build-tools with administrative privilege.
reinstal node modules or node-sass with npm install
The error happened when running node-gyp during installation of node-sass as you can see in the error. Also mentioned in the error log, you most likely do not have Python installed.
Try running node-gyp rebuild.
If that fails, it means it is not setup correctly. Follow node-gyp documentation to setup your environment correctly, then re-run npm install.
Also, take a look at node-sass supported Node version.

NPM throws error while installing quick.db

I am trying to install quick.db to get started with databases and SQLite3 specifically, but when I try installing it, it always throws an error. The NPM version I have is 6.14.11 and Node version is v14.16.0.
> better-sqlite3#7.1.2 install E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
> prebuild-install || npm run build-release
prebuild-install WARN install No prebuilt binaries found (target=14.16.0 runtime=node arch=x64 libc= platform=win32)
> better-sqlite3#7.1.2 build-release E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
> node-gyp rebuild --release
E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd E:\JAVASCRIPT\Tutorials\DATABASES\node_modules\better-sqlite3
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 build-release 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\gigabyte\AppData\Roaming\npm-cache\_logs\2021-03-14T09_23_59_004Z-debug.log
npm WARN databases#1.0.0 No description
npm WARN databases#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3#7.1.2 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3#7.1.2 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\gigabyte\AppData\Roaming\npm-cache\_logs\2021-03-14T09_23_59_397Z-debug.log
After juggling through the internet, I finally found the correct answer that works.
Here is the link to that:https://stackoverflow.com/questions/55152761/npm-wont-install-quick-db-returns-these-errors#:~:text=All%20you%20have%20to%20do,I%20found%20this%20solution%20here!
The first answer is perfect!

How to fix gyp ERR! build error using npm?

I've been using cmd truffle unbox react to create react files in my dapp. However, every time I command it, it pops up gyp ERR! build error. I don't know how to fix it. Please help!
I've tried this, still not working.
https://github.com/nodejs/node-gyp/issues/983
C:\Users\ASUS\Desktop\truffle-react Dapp>truffle unbox react
√ Preparing to download
√ Downloading
√ Cleaning up temporary files
- Setting up boxgyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASUS\Desktop\truffle-react Dapp\client\node_modules\scrypt
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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! 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.
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\ASUS\AppData\Roaming\npm-cache\_logs\2019-08-19T05_46_55_107Z-debug.log
× Setting up box
Error: Command failed: cd client && npm install
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ASUS\Desktop\truffle-react Dapp\client\node_modules\scrypt
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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! 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.
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\ASUS\AppData\Roaming\npm-cache\_logs\2019-08-19T05_46_55_107Z-debug.log
at checkExecSyncError (child_process.js:631:11)
at execSync (child_process.js:668:15)
at Object.installBoxDependencies (C:\Users\ASUS\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-box\lib\utils\unbox.js:118:1)
at Object.setUpBox (C:\Users\ASUS\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-box\lib\utils\index.js:62:1)
at Object.unbox (C:\Users\ASUS\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-box\box.js:58:1)
Truffle v5.0.32 (core: 5.0.32)
Node v12.1.0
I had a similar issue. It was due to a dependency not being compatible with the latest version of Node. I recommend using NVM to temporally roll back the Node version and try again.

npm: Why is it giving an error with "node-pre-gyp"?

I have created a new Angular project and I ran npm i.
As soon as I did that, some installs were successful until I got the following error on my Terminal.
I have already uninstalled node-gyp and re-installed.
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.9 and node#12.5.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/build'
gyp ERR! System Darwin 18.0.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/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents
gyp ERR! node -v v12.5.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/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --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/isaac/Desktop/Tutorials/Angular/ng-refresher/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.0.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents
node-pre-gyp ERR! node -v v12.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.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=/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
I was hoping for npm i to run smoothly, but instead, I received that error.
Your project uses (probably indirectly) a native module. Since it doesn't have a pre-built module for the combination of your OS and Node version, npm attempts to build it locally. It eventually fails with this error:
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/isaac/Desktop/Tutorials/Angular/ng-refresher/node_modules/fsevents/build'
Make sure the user you're using to run npm install has the permissions to create that directory, and rerun npm install.

Grpc error while installing Firebase for React

I've been trying to fix this error for 2 days now. All I did to get the error was:
create-react-app appname
cd appname
npm install firebase --save (and that's the part that failed to install correctly)
These are the major fixes I've tried:
Installed latest version of Python 3 and added it to the windows path variable.
Manually downloaded grpc and added it to the project.
Updated Node to v10+.
I also tried other minor things not worth mentioning, but it didn't make a difference. None of them worked. I tried with multiple clean react apps so react wasn't the issue either.
C:\Users\Future\Desktop\react-turbo>npm i firebase --save
> grpc#1.10.1 install C:\Users\Future\Desktop\react-turbo\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.10.1 and node#10.0.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 "C:\Users\Future\AppData\Local\Programs\Python\Python36-32\python.EXE", 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:149: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" "--library=static_library" "--module=C:\\Users\\Future\\Desktop\\react-turbo\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Future\\Desktop\\react-turbo\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\Users\Future\Desktop\react-turbo\node_modules\grpc
gyp ERR! node -v v10.0.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 --library=static_library --module=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Future\Desktop\react-turbo\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:947:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Future\\Desktop\\react-turbo\\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\Future\Desktop\react-turbo\node_modules\grpc
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
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 --library=static_library --module=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Future\Desktop\react-turbo\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 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.10.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! C:\Users\Future\AppData\Roaming\npm-cache\_logs\2018-05-07T15_01_00_277Z-debug.log
I will recommend that instead of installing node latest version (which might not be well supported by all libraries) try to use the v8.11 stable version.
Then there are couple of actions/trick to handle this thing:
You might be using Windows 10, so try to disable your antivirus and then try again. If on Linux try to use command sudo in start.
Check this as well: unable to install firebase tools cli using windows 10
And this: Error with npm install - a pre-gyp error
Additional Information
In reference to learning Firebase these might help you as well:
https://medium.com/quick-code/how-to-integrate-react-redux-and-firebase-in-3-simple-steps-c44804a6af38
https://www.codementor.io/yurio/all-you-need-is-react-firebase-4v7g9p4kf
I needed to downgrade node from 10.12 to 8.11
node -v
v10.12.0
npm install -g n
n 8.11.1
mode -v
v8.11.1
I don't know if this is relevant, but I was also getting similar errors.
I was trying to do install the firebase using expo (as recommended in the docs)
expo install firebase
and this was failing for me. I noticed that the issue was related to my package-lock.json where node-pre-gyp was getting added. Wasted some time, but finally the issue was resolved when I did a npm install (and not expo install)
Hope this helps people in the future.
npm install firebase --save

Resources