Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'commander' #688

Closed
mcandre opened this issue Jan 31, 2015 · 3 comments
Closed

Error: Cannot find module 'commander' #688

mcandre opened this issue Jan 31, 2015 · 3 comments

Comments

@mcandre
Copy link

mcandre commented Jan 31, 2015

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.

@pkoppstein
Copy link
Contributor

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".

@mcandre
Copy link
Author

mcandre commented Jan 31, 2015

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

@nivassri
Copy link

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

Error is:
js2coffee@0.3.3 preinstall C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\node_modules\js2coffee

node ./cyclic.js

npm WARN engine coffee-script-redux@2.0.0-beta8: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.1","npm":"2.14.7"})

utf-8-validate@1.2.1 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

bufferutil@1.2.1 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 utf-8-validate@1.2.1

utf-8-validate@1.2.1 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 bufferutil@1.2.1

bufferutil@1.2.1 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 utf-8-validate@1.2.1
npm WARN optional dep failed, continuing bufferutil@1.2.1
C:\Users\Admin\AppData\Roaming\npm\lineman -> C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman\cli.js
lineman@0.36.6 C:\Users\Admin\AppData\Roaming\npm\node_modules\lineman
├── connect-livereload@0.4.1
├── config-extend@0.0.6
├── lodash@0.9.2
├── semver@2.1.0
├── grunt-contrib-copy@0.4.1
├── commander@1.3.2 (keypress@0.1.0)
├── coffee-script@1.6.3
├── underscore.string@2.3.3
├── grunt-contrib-coffee@0.7.0
├── grunt-asset-fingerprint@0.2.1 (lodash@2.4.2)
├── resolve@0.6.3
├── grunt-contrib-clean@0.5.0 (rimraf@2.2.8)
├── normalize-package-data@0.2.13 (github-url-from-git@1.1.1, github-url-from-username-repo@0.1.0)
├── grunt-contrib-cssmin@0.6.1 (clean-css@1.0.12, grunt-lib-contrib@0.6.1)
├── grunt-contrib-jst@0.5.1 (lodash@1.0.2, grunt-lib-contrib@0.5.3)
├── grunt-contrib-sass@0.9.2 (async@0.9.2, dargs@4.0.1, cross-spawn@0.2.9, chalk@1.1.1, which@1.2.0)
├── watch_r-structr-lock@0.0.1 (async@0.2.10, underscore@1.4.4, structr@0.2.3, commander@1.1.1, ejs@0.8.8, tq@0.2.5)
├── grunt-concat-sourcemap@0.4.3 (source-map@0.1.31)
├── js2coffee@0.3.3 (underscore@1.6.0, file@0.2.2, nopt@3.0.6, coffee-script@1.7.1)
├── grunt-watch-nospawn@0.0.8 (tiny-lr-fork@0.0.5, gaze@0.3.3)
├── grunt-contrib-uglify@0.2.4 (grunt-lib-contrib@0.6.1, uglify-js@2.4.24)
├── grunt@0.4.5 (eventemitter2@0.4.14, dateformat@1.0.2-1.2.3, which@1.0.9, async@0.1.22, colors@0.6.2, getobject@0.1.0, rimraf@2.2.8, hooker@0.2.3, grunt-legacy-util@0.2.0, exit@0.1.2, coffee-script@1.3.3, iconv-lite@0.2.11, underscore.string@2.2.1, glob@3.1.21, nopt@1.0.10, minimatch@0.2.14, grunt-legacy-log@0.1.2, findup-sync@0.1.3, js-yaml@2.0.5)
├── http-proxy@0.10.3 (colors@0.6.2, pkginfo@0.2.3, optimist@0.3.7, utile@0.1.7)
├── grunt-contrib-handlebars@0.8.0 (chalk@0.4.0, grunt-lib-contrib@0.5.3, handlebars@1.3.0)
├── grunt-contrib-jshint@0.11.0 (hooker@0.2.3, jshint@2.6.3)
├── fetcher@0.2.0 (underscore@1.8.3, async@0.9.2, coffee-script@1.10.0, which@1.2.0, cpr@0.2.0, mkdirp@0.5.1, rimraf@2.4.3, decompress@0.2.5, request@2.65.0, cson-safe@0.1.1)
├── express@3.4.0 (methods@0.0.1, cookie-signature@1.0.1, fresh@0.2.0, range-parser@0.0.4, buffer-crc32@0.2.1, cookie@0.1.0, commander@1.2.0, mkdirp@0.3.5, send@0.1.4, debug@2.2.0, connect@2.9.0)
└── testem@0.7.6 (growl@1.8.1, xml-escape@1.0.0, styled_string@0.0.1, did_it_work@0.0.6, consolidate@0.11.0, async@0.9.2, charm@1.0.0, colors@1.1.2, mustache@1.2.0, backbone@1.2.3, commander@2.9.0, cross-spawn@0.2.9, http-proxy@1.12.0, fireworm@0.6.6, mkdirp@0.5.1, glob@4.5.3, express@4.13.3, rimraf@2.4.3, fileset@0.1.8, npmlog@1.2.1, tap@0.6.0, js-yaml@3.4.3, socket.io@1.3.7)

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

No branches or pull requests

4 participants