Everytime i run my discord speech recognition code it goes online but as soon as it join the channel my code shows Error: Cannot find module '#discordjs/opus'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
Error: Cannot find module 'node-opus'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
Error: Cannot find module 'opusscript'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
2021-01-26T04:50:28.411Z :: discordClient message: Error: Error: Cannot find module '#discordjs/opus'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
Error: Cannot find module 'node-opus'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
Error: Cannot find module 'opusscript'
Require stack:
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\util\loader.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\Opus.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\opus\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\prism-media\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BasePlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\player\BroadcastAudioPlayer.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\VoiceBroadcast.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\voice\ClientVoiceManager.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\client\Client.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\discord.js\src\index.js
- C:\Users\SURYASH\Desktop\DiscordSpeechBot\index.js
Also while installing required modules/libraries it shows that somehow it can't install discord/opus
> #discordjs/opus#0.1.0 install C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus
> 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(404): https://github.com/discordjs/opus/releases/download/v0.1.0/opus-v0.1.0-node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for #discordjs/opus#0.1.0 and node#14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\SURYASH\\Desktop\\DiscordSpeechBot\\node_modules\\#discordjs\\opus\\prebuild\\node-v83-win32-x64\\opus.node" "--module_name=opus" "--module_path=C:\\Users\\SURYASH\\Desktop\\DiscordSpeechBot\\node_modules\\#discordjs\\opus\\prebuild\\node-v83-win32-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus
gyp ERR! node -v v14.15.4
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 'C:\Program Files\nodejs\node.exe C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus\prebuild\node-v83-win32-x64\opus.node --module_name=opus --module_path=C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus\prebuild\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\SURYASH\Desktop\DiscordSpeechBot\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 Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\SURYASH\\Desktop\\DiscordSpeechBot\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus
node-pre-gyp ERR! node -v v14.15.4
node-pre-gyp ERR! node-pre-gyp -v v0.14.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 --module=C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus\prebuild\node-v83-win32-x64\opus.node --module_name=opus --module_path=C:\Users\SURYASH\Desktop\DiscordSpeechBot\node_modules\#discordjs\opus\prebuild\node-v83-win32-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! #discordjs/opus#0.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #discordjs/opus#0.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\SURYASH\AppData\Roaming\npm-cache\_logs\2021-01-26T04_57_11_574Z-debug.log
So eventually my bot code require opus module and somehow it cant install it.
Try this:
npm install discordjs/opus
I had the same issue "Error: Cannot find module '#discordjs/opus'" when trying to get my discord js bot to play an .mp3 file when a certain user was speaker
Figured this solution out by watching this video.
youtube.com/watch?v=WXohhIJ1-f4
If you don't want to click on the link, just search "How to play audio in voice channel discord js" on youtube!
first you need to install python,after that run this(admin powershell):
npm install -g windows-build-tools
if this command doesnt fix your issue (node-gyp issue)than
# before installing node-gyp on windows
npm install --global --production windows-build-tools
# install node-gyp globally
npm install -g node-gyp
Try installing this: npm install --global windows-build-tools with an admin powershell. windows-build-tools installs python with it.
open powershell(admin)
and type:
npm install -g windows-build-tools
before installing node-gyp on windows
npm install --global --production windows-build-tools
install node-gyp globally
npm install -g node-gyp
First install python from https://www.python.org/downloads/. That seems to be the main problem
When installing make sure to select Add python to path
how to add python to path
Close the terminal reopen it, then try again.
If it still doesn't work, open windows power-shell as admin, and type npm i -g windows-build-tools
Close the terminal reopen and try downloading the packages again
Related
I'm trying to install johnny-five on windows7 64 bit. I have an earlier version of Node (v.13.14.0-64) installed and I use Visual Studio Code as my code editor.
Regarding the first part of the error, prebuild-install WARN install No prebuilt binaries found (target=13.14.0 runtime=node arch=x64 libc= platform=win32). I simply don't know what this means even after reading forums about this error.
I have Python installed and the error says it can't find it. I went to this website trying to fix the error but still wasn't able to find a solution.
> #serialport/bindings#8.0.8 install C:\Users\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings
> prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=13.14.0 runtime=node arch=x64 libc= platform=win32)
C:\Users\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings>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 )
else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:310:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:467:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 6.1.7601
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\HP\Documents\GitHub\NODE\node_modules\#serialport\bindings
gyp ERR! node -v v13.14.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\HP\Documents\GitHub\NODE\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\HP\Documents\GitHub\NODE\package.json'
npm WARN NODE No description
npm WARN NODE No repository field.
npm WARN NODE No README data
npm WARN NODE No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #serialport/bindings#8.0.8 (node_modules\#serialport\bindings):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #serialport/bindings#8.0.8 install: `prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ johnny-five#2.1.0
updated 1 package and audited 101 packages in 8.473s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Any help is appreciated.
I have started my project and I have started installing packages but suddenly I got an error and that error comes when I try to install a bcrypt.
first I try to install bcrypt.
npm install bcrypt
I got an error.
> bcrypt#3.0.7 install C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases /download/v3.0.7/bcrypt_lib-v3.0.7-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.7 and node#10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Abdulsalam\AppData\Local\Programs\Python\Python36\python.EXE -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:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
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" "configure" "--fallback-to-build" "--module=C:\\Users\\Abdulsalam\\application\\clothes_store\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\Abdulsalam\\application\\clothes_store\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt
gyp ERR! node -v v10.15.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Abdulsalam\application\clothes_store\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189: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:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Abdulsalam\\application\\clothes_store\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.13.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 --module=C:\Users\Abdulsalam\application\clothes_store\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\Abdulsalam\application\clothes_store\node_modules \bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN clothes_store#1.0.0 No description
npm WARN clothes_store#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#3.0.7 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\Abdulsalam\AppData\Roaming\npm-cache\_logs\2019-12-09T18_07_53_927Z-debug.log
Sorry It's a long error but I hope someone helps me because I have to finish this project very quickly
and I haven't started yet.
If you're using windows, you need to use bcryptjs via:
npm install --save bcryptjs
You are facing some of the error described inside the bcrypt package. I advice you to go to their npm page and read through the description.
They have a paragraph where they describe:
IF you have an error like this:
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-v48-linux-x64.tar.gz
make sure you have the appropriate dependencies installed and configured for your platform. You can find installation instructions for the dependencies for some common platforms in this page.
So I just advice you to go to their page and follow the instructions..
When I install bcrypt module for my hapi js project it is not installed and it's shows something like
node-pre-gyp install --fallback-to-build
I tried to install by running;
npm i node-pre-gyp
but it's not working.
Error:
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i bcrypt
> bcrypt#3.0.6 install C:\Users\safras\Desktop\authenticatin\node_modules\bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.6 and node#12.10.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
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 checking VS2019 (16.3.29411.108) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - "Visual Studio C++ core features" missing
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
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:344: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:365: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:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
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" "configure" "--fallback-to-build" "--module=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v72"
gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--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> (C:\Users\safras\Desktop\authentication\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:209: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 Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\safras\\Desktop\\authentication\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp ERR! node -v v12.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.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
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt#3.0.6 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\safras\AppData\Roaming\npm-cache\_logs\2019-10-18T06_32_05_741Z-debug.log
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i node-pre-gyp
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm WARN authentication#1.0.0 No repository field.
+ node-pre-gyp#0.13.0
added 4 packages from 8 contributors, removed 1 package and audited 244 packages in 2.057s
found 0 vulnerabilities
PS C:\Users\safras\Desktop\authentication\loginLogout> #hapi/hapi -v
At line:1 char:7
+ #hapi/hapi -v
+ ~
PS C:\Users\safras\Desktop\authentication\loginLogout> npm install -g node-gyp
C:\Users\safras\AppData\Roaming\npm\node-gyp -> C:\Users\safras\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
+ node-gyp#6.0.0
updated 1 package in 5.76s
PS C:\Users\safras\Desktop\authentication\loginLogout> npm i bcrypt
bcrypt#3.0.6 install C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.6 and node#12.10.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
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 checking VS2019 (16.3.29411.108) found at:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp ERR! find VS - "Visual Studio C++ core features" missing
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
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:344: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:365: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:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
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" "configure" "--fallback-to-build" "--module=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\lib\\binding" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
"--node_napi_label=node-v72"
gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--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> (C:\Users\safras\Desktop\authentication\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:209: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 Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\safras\\Desktop\\authentication\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\safras\Desktop\authentication\node_modules\bcrypt
node-pre-gyp ERR! node -v v12.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.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
--module=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\Users\safras\Desktop\authentication\node_modules\bcrypt\lib\binding
--napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN hapi-auth-basic#5.0.0 requires a peer of hapi#>=17.x.x but none is installed. You must install peer dependencies yourself.
npm WARN authentication#1.0.0 No description
npm WARN authentication#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!enter code here
npm ERR! Failed at the bcrypt#3.0.6 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\safras\AppData\Roaming\npm-cache\_logs\2019-10-18T06_35_24_418Z-debug.log
try to uninstall bcrypt and install bcryptjs
npm install --save bcryptjs && npm uninstall --save bcrypt
I'd suggest you use bcryptjs
This is probably because you are not ysing a stable version of node. Check the docs on npm here
node-gyp only works with stable/released versions of node. Since the bcrypt module uses node-gyp to build and install, you'll need a stable version of node to use bcrypt. If you do not, you'll likely see an error that starts with:
gyp ERR! stack Error: "pre" versions gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
if you want bcrypt than
npm install --build-from-resource
if above command doesnt fix your issue than it could be issue with fsevents ((only if you are using it)) so for this run
npm install fsevents
if yet problem persist than it is issue with your node version and grpc version please click here for more info
I am a react beginner trying to figure out how to build components but I cannot get my page running while trying to follow this tutorial. https://www.youtube.com/watch?v=aK3aUW08YGw&list=PLEsfXFp6DpzQbwYDx1zgcKJ4tzyWFaESK&index=25When I try to npm install dropzone I'm greeted with a huge list of error messages. Then when i type npm list dropzone, the tree appears empty. Here's the error log:
adampease-> npm install --save react-dropzone
> fsevents#1.2.4 install /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
> node install
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents#1.2.4 and node#11.10.0 (node-v67 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:297:12)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at maybeClose (internal/child_process.js:984:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:401:11)
gyp ERR! stack at Socket.emit (events.js:197:13)
gyp ERR! stack at Pipe._handle.close (net.js:611:12)
gyp ERR! System Darwin 16.3.0
gyp ERR! command "/Users/adampease/.nvm/versions/node/v11.10.0/bin/node" "/Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
gyp ERR! node -v v11.10.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/adampease/.nvm/versions/node/v11.10.0/bin/node /Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:984:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 16.3.0
node-pre-gyp ERR! command "/Users/adampease/.nvm/versions/node/v11.10.0/bin/node" "/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents
node-pre-gyp ERR! node -v v11.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/adampease/.nvm/versions/node/v11.10.0/bin/node /Users/adampease/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/adampease/Desktop/projects/resize/node_modules/react-scripts/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN ts-pnp#1.0.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/react-scripts/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ react-dropzone#8.1.0
updated 1 package and audited 36308 packages in 22.039s
found 63 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
I faced these issue due to having Python 3.0 installed on my machine. I downgraded it to Python 2.7 and it worked.
I'm using MacOS and is trying to install web3. I'm getting this error response message which I'm not sure how to resolve.
I have other code editors installed in my mac, and currently I'm learning how to do some blockchain development. Would be really helpful if someone could assist me in this. Thanks!
npm WARN deprecated fs-promise#2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz#1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> scrypt#6.0.3 preinstall /Users/HTT/inbox/node_modules/scrypt
> node node-scrypt-preinstall.js
> scrypt#6.0.3 install /Users/HTT/inbox/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.4, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/HTT/inbox/node_modules/scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN inbox#1.0.0 No description
npm WARN inbox#1.0.0 No repository field.
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! /Users/HTT/.npm/_logs/2018-04-26T14_03_17_140Z-debug.log
I fixed it by specifying the version. Not really a "fix", but working with stable releases is something I can get behind
npm install -g web3#0.20.6
I have also seen that this will do the trick
npm install ethereum/web3.js
You can use this command to check the python version :
python --version
Because you need to use node-gyp, it is recommended to install python2.7.