I just tried to create basic chat application using the following instructionhttp://socket.io/get-started/chat/.
When i tried to run npm install --save socket.io
I am getting the following error. How can solve the following error:
npm WARN package.json socket-chat-example#0.0.1 No repository field.
npm WARN package.json socket-chat-example#0.0.1 No README data
npm WARN package.json socket-chat-example#0.0.1 No license field.
> bufferutil#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
cwd /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
> utf-8-validate#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
make: g++: Command not found
make: *** [Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil#1.2.1
> utf-8-validate#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
make: g++: Command not found
make: *** [Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
> bufferutil#1.2.1 install /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
make: Entering directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: g++: Command not found
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 127
make: Leaving directory `/root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/chat-example/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
socket.io#1.3.7 node_modules/socket.io
├── has-binary-data#0.1.3 (isarray#0.0.1)
├── debug#2.1.0 (ms#0.6.2)
├── socket.io-parser#2.2.4 (isarray#0.0.1, debug#0.7.4, component-emitter#1.1.2, benchmark#1.0.0, json3#3.2.6)
├── socket.io-adapter#0.3.1 (object-keys#1.0.1, debug#1.0.2, socket.io-parser#2.2.2)
├── engine.io#1.5.4 (base64id#0.1.0, debug#1.0.3, engine.io-parser#1.2.2, ws#0.8.0)
└── socket.io-client#1.3.7 (to-array#0.1.3, indexof#0.0.1, component-bind#1.0.0, debug#0.7.4, backo2#1.0.2, object-component#0.0.3, component-emitter#1.1.2, has-binary#0.1.6, parseuri#0.0.2, engine.io-client#1.5.4)
Please check this error and what is causing issue?
Please suggest
have you tried installing node-gyp and g++?
npm install -g node-gyp
and g++
apt-get install g++
Related
when entering a command npm audit fix --force I get an error
The error as it appears on the cmd is as follows:
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating sqlite3 to 4.2.0,which is a SemVer major change.
npm ERR! code 1
npm ERR! path C:\FluffyBot\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! �믮������ ������⥫쭠� ᡮઠ ��⮢ � �⮬ �襭��. �⮡� ������� ��ࠫ������ ᡮ��, ������� ��ࠬ��� "/m".
npm ERR! unpack_sqlite_dep
npm ERR! "C:\Program" �� ���� ����७��� ��� ���譥�
npm ERR! ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.
npm ERR! C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" �����訫��� � ����� 1. [C:\FluffyBot\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.6.1 | win32 | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.2.0 and node#16.6.1 (node-v93 ABI, unknown) (falling back
to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.18 found at "C:\Python27\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1759) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! (node:12452) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn C:\Python27\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\FluffyBot\\node_modules\\sqlite3\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\ILYA\\AppData\\Local\\node-gyp\\Cache\\16.6.1\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\ILYA\\AppData\\Local\\node-gyp\\Cache\\16.6.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\ILYA\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.6.1\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\FluffyBot\\node_modules\\sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\FluffyBot\\node_modules\\sqlite3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | win32 | x64
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\FluffyBot\\node_modules\\sqlite3\\lib\\binding\\node-v93-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\FluffyBot\\node_modules\\sqlite3\\lib\\binding\\node-v93-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd C:\FluffyBot\node_modules\sqlite3
npm ERR! gyp ERR! node -v v16.6.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! 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 build --fallback-to-build --module=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\FluffyBot\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\FluffyBot\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\FluffyBot\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\FluffyBot\node_modules\sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.6.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
I tried using earlier and later versions but it didn't help.Could some one have a look at the error and let me know what steps I need to do to rectify this..
I am on node.js 16.6.1 and npm 7.20.3
I am running npm install -g node-inspector command and getting this error, I don`t know what to upgrade and how to ?
Full error I am getting is :
C:\xampp\htdocs\node\debug>npm install -g node-inspector
npm WARN deprecated boom#2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek#2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles#2.0.5: This version is no longer maintained. Please upgrade to the latest version.
> v8-profiler#5.7.0 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node -e 'process.exit(0)'
> v8-debug#1.0.1 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node -e 'process.exit(0)'
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-inspector -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-debug -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\node-debug.js
> v8-debug#1.0.1 install C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#1.0.1 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#1.0.1 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509: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:154:21)
gyp ERR! System Windows_NT 10.0.17134
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\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! 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\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
node-pre-gyp ERR!stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
stack at FSReqWrap.oncomplete (fs.js:154:21)
node-pre-gyp gyp ERR! System Windows_NT 10.0.17134
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\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp gypERR! ERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-gyp -v v3.8.0
node-pre-gypgyp ERR!ERR! System Windows_NT 10.0.17134
not oknode-pre-gyp
ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '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\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug#1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#1.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ashwanipanwar\AppData\Roaming\npm-cache\_logs\2019-02-18T06_14_35_105Z-debug.log
You can do npm update <package name> to update specific pacakage. To update it globally you can use -g. To update all the outdated packages you can use just npm update
To update to specific version use '#packageversionname' after package as like npm update express#1.0.2
If you are still getting error try uninstalling it first and installing it to specific version
I use npm install node-gyp and it run well , but when I use npm to install zmq, the node-gyp rebuild fail and the error below. I need the /zmq/build for my program to run.
I try reinstall the node-gyp but didn't work. Is anyone met this situation before?
zmq#2.15.3 install /lib/jinteki/netrunner/node_modules/zmq
node-gyp rebuild
make: Entering directory `/lib/jinteki/netrunner/node_modules/zmq/build'
CXX(target) Release/obj.target/zmq/binding.o../binding.cc:28:17: fatal
error: zmq.h: No such file or directory
#include <zmq.h>
^
compilation terminated.
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory `/lib/jinteki/netrunner/node_modules/zmq/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules
/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:204:12)
gyp ERR! System Linux 3.13.0-86-generic
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 /lib/jinteki/netrunner/node_modules/zmq
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
You don't have the appropriate zeromq library headers installed. The name of the package that provides these headers varies depending on your platform/distro. See the zmq readme for complete installation instructions.
I am using redhat5.9. I found the 'make' related exception. I am wondering what are they making? I think they are just javascript relatd stuff.
[root#xxxx bin]# npm install -g sinopia --python=/usr/local/clo/ven/python-2.7.11/bin/python
> crypt3#0.1.8 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
CXX(target) Release/obj.target/crypt3/crypt3.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/crypt3/crypt3.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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:200:12)
gyp ERR! System Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/crypt3
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
> fs-ext#0.4.5 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/.node-gyp"
make: Entering directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
CXX(target) Release/obj.target/fs-ext/fs-ext.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1
make: Leaving directory `/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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:200:12)
gyp ERR! System Linux 2.6.18-406.el5
gyp ERR! command "/usr/local/clo/ven/node-v4.2.3-linux-x64/bin/node" "/usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/fs-ext
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing crypt3#0.1.8
npm WARN optional dep failed, continuing fs-ext#0.4.5
-
> dtrace-provider#0.4.0 install /usr/local/clo/ven/node-v4.2.3-linux-x64/lib/node_modules/sinopia/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
First install gyp globally using sudo, then install module
sudo npm install -g gyp
sudo npm install /your module/
I am trying to implement a requirement on node-xmpp-server, but i am facing issue while installing this module. I have read the blog on how to install and read few other blog posts too, but nothing is helping me out.
When I am trying to use npm install with the dependency mentioned in package.json or if I explicitly install the module, i am getting following error:
> node-stringprep#0.5.2 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! node-stringprep#0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-stringprep#0.5.2 install script.
npm ERR! This is most likely a problem with the node-stringprep 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 their info via:
npm ERR! npm owner ls node-stringprep
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-server"
npm ERR! cwd /home/gaurav/NodeOffcRepo/chatPro
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
|
> node-expat#2.3.1 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Socket.<anonymous> (child_process.js:1167:11)
gyp ERR! stack at Socket.emit (events.js:107:17)
gyp ERR! stack at Pipe.close (net.js:461:12)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gaurav/NodeOffcRepo/chatPro/npm-debug.log
npm ERR! not ok code 0
My node version is: v0.13.0-pre
If some more info is needed, please comment.
Check if the dependencies of node-xmpp module is installed.
Try to see node xmpp documentation
You need to install first node-expat which is dependent of libexpat library. I tried
yum install libexpat
but it does not exist. I was able to find another library which helps.
Try:
(for CentOS)
yum install libicu-devel
(for Debian 6 system)
apt-get install libicu-dev
Then
npm install node-expat
Then you can install node-xmpp module.