How to resolve this sinopia installation error? - javascript

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/

Related

How do is solve the problem with installing the node.js sqlite3 package?

When I install the sqlite3 package for a node.js by npm install sqlite3 in command prompt and Error appears,
to watch error presshereto show image
,this Error in below:
C:\Windows\system32>npm install sqlite3
npm WARN deprecated
request#2.88.2: request has been deprecated, see
https://github.com/request/request/issues/3142 npm WARN deprecated
har-validator#5.1.5: this library is no longer supported
sqlite3#5.0.1 install C:\Windows\system32\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403):
https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.1 and
node#14.15.4 (node-v83 ABI, unknown) (falling back to source compile
with node-gyp) gyp ERR! find VS gyp ERR! find VS msvs_version was set
from command line or npm config gyp ERR! find VS - looking for Visual
Studio version 2017 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 valid versions for msvs_version: 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:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013
(C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at
C:\Windows\System32\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:\Windows\system32\node.exe" "C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
"configure" "--fallback-to-build"
"--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3"
"--module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64"
"--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=6"
"--node_napi_label=napi-v6" "--python=/path/to/executable/python"
"--msvs_version=2017" gyp ERR! cwd
C:\Windows\system32\node_modules\sqlite3 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:\Windows\system32\node.exe
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64
--napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=/path/to/executable/python --msvs_version=2017' (1) node-pre-gyp ERR! stack at ChildProcess.
(C:\Windows\System32\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.19041 node-pre-gyp ERR!
command "C:\Windows\system32\node.exe"
"C:\Windows\System32\node_modules\node-pre-gyp\bin\node-pre-gyp"
"install" "--fallback-to-build" node-pre-gyp ERR! cwd
C:\Windows\system32\node_modules\sqlite3 node-pre-gyp ERR! node -v
v14.15.4 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR!
not ok Failed to execute 'C:\Windows\system32\node.exe
C:\Windows\System32\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64\node_sqlite3.node
--module_name=node_sqlite3 --module_path=C:\Windows\system32\node_modules\sqlite3\lib\binding\napi-v6-win32-x64
--napi_version=7 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=/path/to/executable/python --msvs_version=2017' (1) npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\system32\package.json' npm WARN system32
No description npm WARN system32 No repository field. npm WARN
system32 No README data npm WARN system32 No license field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sqlite3#5.0.1
install: node-pre-gyp install --fallback-to-build npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the sqlite3#5.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Amjad\AppData\Roaming\npm-cache_logs\2021-02-04T16_21_25_568Z-debug.log
C:\Windows\system32>

How to solve npm install error node-gyp.js

When I run npm install I see following error, I am running Angular app
> strong-ursa#0.10.1 install C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
> node-gyp rebuild
C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa>if not defined npm_config_node_gyp (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
ursaNative.cc
win_delay_load_hook.cc
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(484): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
c:\ansysdev\licensingexternal\node_modules\strong-ursa\src\ursanative.cc(504): warning C4244: 'argument': conversion from 'ssize_t' to 'i
nt', possible loss of data [C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\ANSYSDev\LicensingExternal\node_modules\strong
-ursa\build\ursaNative.vcxproj]
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:\cygwin64\home\kjeeva\ANSYSDev\Licensing194\LicensingPortalInternal\node\node-v8.12.0-win-x64\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node.exe" "C:\\cygwin64\\home\\kjeeva\\ANSYSDev\\Licensing194\\LicensingPortalInternal\\node\\node-v8.12.0-win-x64\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\ANSYSDev\LicensingExternal\node_modules\strong-ursa
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
I am not sure what to do with this error

node-gyp rebuild fail , zmq/build file can't create

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.

Basic chat application Creating using Socket.io and Node js

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++

Error installing node-xmpp-server 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.

Categories

Resources