Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

npm install mosca --save ==> error #526

Closed
seksity opened this issue Jul 22, 2016 · 5 comments
Closed

npm install mosca --save ==> error #526

seksity opened this issue Jul 22, 2016 · 5 comments

Comments

@seksity
Copy link

seksity commented Jul 22, 2016

i using windows 10 pro 64x, nodejs 4.4.7 64-bit and create new project with npm init, then npm install mosca --save, it show error like below:-

mqtt_server\node_modules\mosca\node_modules\hiredis>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [D:\NodeJS\Projects\mqt
t\mosca\mqtt_server\node_modules\mosca\node_modules\hiredis\build\deps\hiredis-c.vcxproj]

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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 D:\NodeJS\Projects\mqtt\mosca\mqtt_server\node_modules\mosca\node_modules\hiredis
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
.... and more

How to fix it?

@mcollina
Copy link
Collaborator

Those are optional C++ dependencies. Is installing completing ok anyway? Can you upload the full npm log?

To install those dependencies you need https://github.com/nodejs/node-gyp#installation.

@seksity
Copy link
Author

seksity commented Jul 24, 2016

Thank you, npm log as below:-

D:\NodeJS\Projects_test>npm install mosca --save
npm WARN package.json my_test@1.0.0 No description
npm WARN package.json my_test@1.0.0 No repository field.
npm WARN package.json my_test@1.0.0 No README data

hiredis@0.4.1 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\hiredis
node-gyp rebuild

|
|

defined npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\hiredis
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or
higher to avoid a RegExp DoS issue

kerberos@0.0.21 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kerberos
(node-gyp rebuild) || (exit 0)

D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kerberos>if
not defined npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kerberos
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN optional dep failed, continuing hiredis@0.4.1

zmq@2.15.3 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\zmq
node-gyp rebuild

D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\zmq>if
not defined npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\zmq
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or
higher to avoid a RegExp DoS issue

fs-ext@0.5.0 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\qlobber-fsq\node_modules\fs-ext
node-gyp configure build

D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\qlobber-fsq\node_modules\fs-ext>if
not defined npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
configure build ) else (node "" configure build )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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" "build"
gyp ERR! cwd
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\qlobber-fsq\node_modules\fs-ext
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN optional dep failed, continuing zmq@2.15.3

npm WARN optional dep failed, continuing fs-ext@0.5.0

snappy@4.1.2 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kafka-node\node_modules\snappy
node-gyp rebuild

D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kafka-node\node_modules\snappy>if
not defined npm_config_node_gyp (node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
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
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\ascoltatori\node_modules\kafka-node\node_modules\snappy
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

leveldown@1.4.6 install
D:\NodeJS\Projects_test\node_modules\mosca\node_modules\leveldown
prebuild --install

prebuild WARN install No prebuilt binaries found (target=v4.4.7 arch=x64
platform=win32)
Building the projects in this solution one at a time. To enable parallel
build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available
tools versions are "4.0".
prebuild ERR! build error
prebuild ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
prebuild ERR! stack at ChildProcess.onExit
(D:\NodeJS\Projects_test\node_modules\mosca\node_modules\leveldown\node_modules\prebuild\node_modules\node-gyp\lib\build.js:276:23)
prebuild ERR! stack at emitTwo (events.js:87:13)
prebuild ERR! stack at ChildProcess.emit (events.js:172:7)
prebuild ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
prebuild ERR! not ok
prebuild ERR! build Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with
exit code: 1
prebuild ERR! build at ChildProcess.onExit
(D:\NodeJS\Projects_test\node_modules\mosca\node_modules\leveldown\node_modules\prebuild\node_modules\node-gyp\lib\build.js:276:23)
prebuild ERR! build at emitTwo (events.js:87:13)
prebuild ERR! build at ChildProcess.emit (events.js:172:7)
prebuild ERR! build at Process.ChildProcess._handle.onexit
(internal/child_process.js:200:12)
npm WARN optional dep failed, continuing snappy@4.1.2
npm WARN optional dep failed, continuing leveldown@1.4.6
mosca@2.0.2 node_modules\mosca
├── moving-average@0.1.1
├── json-buffer@2.0.11
├── retimer@1.0.1
├── array-from@2.1.1
├── clone@1.0.2
├── extend@3.0.0
├── jsonschema@1.1.0
├── deepcopy@0.6.3
├── shortid@2.2.6
├── uuid@2.0.2
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── lru-cache@4.0.1 (pseudomap@1.0.2, yallist@2.0.0)
├── qlobber@0.7.0
├── minimatch@3.0.2 (brace-expansion@1.1.6)
├── memdown@1.1.2 (inherits@2.0.1, ltgt@1.0.2,
functional-red-black-tree@1.0.1, abstract-leveldown@2.6.0)
├── pbkdf2-password@1.1.0 (fastfall@1.5.1)
├── websocket-stream@3.1.0 (inherits@2.0.1, xtend@4.0.1, ws@1.1.1,
through2@2.0.1, duplexify@3.4.5)
├── steed@1.1.3 (fastfall@1.5.1, fastq@1.4.1, reusify@1.0.1,
fastseries@1.7.2, fastparallel@2.3.0)
├── mqtt-connection@2.1.1 (inherits@2.0.1, through2@0.6.5, reduplexer@1.1.0,
mqtt-packet@3.4.7)
├── msgpack5@3.4.0 (inherits@2.0.1, readable-stream@2.1.4, bl@1.1.2)
├── st@1.1.0 (graceful-fs@4.1.4, negotiator@0.6.1, mime@1.3.4, fd@0.0.2,
bl@1.0.3, async-cache@1.0.0)
├── levelup@1.3.2 (xtend@4.0.1, prr@1.0.1, level-codec@6.1.0, semver@5.1.1,
deferred-leveldown@1.2.1, level-iterator-stream@1.3.1, level-errors@1.0.4)
├── pino@2.7.4 (flatstr@1.0.3, quick-format@2.0.4, core-util-is@1.0.2,
fast-safe-stringify@1.0.9, fast-json-parse@1.0.2, once@1.3.3, chalk@1.1.3,
split2@2.1.0)
├── mqtt@1.12.0 (inherits@2.0.1, xtend@4.0.1, reinterval@1.1.0,
help-me@0.1.0, minimist@1.2.0, readable-stream@1.0.34, commist@1.0.0,
mqtt-packet@3.4.7, end-of-stream@1.1.0, pump@1.0.1, concat-stream@1.5.1,
split2@2.1.0)
├── mongodb@2.1.21 (es6-promise@3.0.2, readable-stream@1.0.31,
mongodb-core@1.3.21)
├── level-sublevel@6.5.4 (ltgt@2.1.2, xtend@4.0.1, typewiselite@1.0.0,
pull-stream@2.21.0, bytewise@1.1.0, levelup@0.19.1)
├── moment@2.13.0
├── brfs@1.4.3 (through2@2.0.1, quote-stream@1.0.2, resolve@1.1.7,
static-module@1.3.1)
├── ioredis@1.15.1 (flexbuffer@0.0.6, double-ended-queue@2.1.0-0,
debug@2.2.0, bluebird@2.10.2, lodash@3.10.1)
├── amqp@0.2.6 (lodash@4.13.1)
└── ascoltatori@3.0.2 (eventemitter2@1.0.5, node-uuid@1.4.7, debug@2.2.0,
msgpack-lite@0.1.20, kerberos@0.0.21, qlobber-fsq@3.0.5, kafka-node@0.3.3)

D:\NodeJS\Projects_test>

On Fri, Jul 22, 2016 at 7:25 PM, Matteo Collina notifications@github.com
wrote:

Those are optional C++ dependencies. Is installing completing ok anyway?
Can you upload the full npm log?

To install those dependencies you need
https://github.com/nodejs/node-gyp#installation.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#526 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ARv9vmuyv14jfipxU2FJaE8uzKy5LXOZks5qYLaugaJpZM4JSsn8
.

@mcollina
Copy link
Collaborator

Only optional dependency failed, you are good to go.

@seksity
Copy link
Author

seksity commented Jul 28, 2016

Thank you.
Error during install optional dependency such as:-

  • error C3861: 'fcntl': identifier not found
  • error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers

Do you have solution or suggestion to fixed it?

@mcollina
Copy link
Collaborator

If you are not using the optional dependency, it is not an issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants