Jq: Error: Cannot find module 'commander'

Created on 31 Jan 2015  Β·  3Comments  Β·  Source: stedolan/jq

When I try to launch jq, it reports a missing dependency, commander.

Trace:

$ npm install -g jq
$ jq

module.js:340
    throw err;
          ^
Error: Cannot find module 'commander'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/andrew/.nvm/v0.10.18/lib/node_modules/jq/bin/jq:7:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

System:

$ specs npm:jq node brew os
Specs:

specs 0.12
https://github.com/mcandre/specs#readme

npm list jq
/Users/andrew/Desktop/
└── (empty)


npm --version
1.3.8

node --version
v0.10.18

brew --version
0.9.5

system_profiler SPSoftwareDataType | grep 'System Version'
      System Version: OS X 10.10.1 (14B25)

As a workaround, I'm using brew install jq instead of npm install -g jq.

not a bug

Most helpful comment

npm's jq is a "Server-side jQuery wrapper for node", which has nothing to do with this jq, which as you say, can be installed using "brew install jq", though you might want to install the more recent "master" version, using "brew install --HEAD jq".

All 3 comments

npm's jq is a "Server-side jQuery wrapper for node", which has nothing to do with this jq, which as you say, can be installed using "brew install jq", though you might want to install the more recent "master" version, using "brew install --HEAD jq".

My mistake, I should have read the NPM description first.

when i am installing lineman in my local it throws an error
am using the command: npm install -g lineman

Error is:
[email protected] preinstall C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\js2coffee

node ./cyclic.js

npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.1","npm":"2.14.7"})

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild

C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>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 MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew
ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i
s installed elsewhere. [C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socke
t.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate\build\binding.sln]
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: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 Windows_NT 10.0.10240
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\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
node-gyp rebuild

C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>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 MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew
ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i
s installed elsewhere. [C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socke
t.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\binding.sln]
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: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 Windows_NT 10.0.10240
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\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\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

C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>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 MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew
ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i
s installed elsewhere. [C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socke
t.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate\build\bind
ing.sln]
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: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 Windows_NT 10.0.10240
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\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\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 v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
node-gyp rebuild

C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil>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 MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framew
ork 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it i
s installed elsewhere. [C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socke
t.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil\build\binding.
sln]
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: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 Windows_NT 10.0.10240
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\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\testem\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
C:\Users\Admin\AppData\Roaming\npm\lineman -> C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\cli.js
[email protected] C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected]
β”œβ”€β”€ underscore.[email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
β”œβ”€β”€ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lhunath picture lhunath  Β·  3Comments

jfeist picture jfeist  Β·  4Comments

rclod picture rclod  Β·  4Comments

tbelaire picture tbelaire  Β·  4Comments

sonots picture sonots  Β·  3Comments