Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Crashes without bunker installed #59

Closed
joebain opened this Issue · 4 comments

2 participants

@joebain

Perhaps I'm missing something but should bunker be a non-optional dependency?

Console log:

$ npm install -g qunit
/usr/local/bin/qunit -> /usr/local/lib/node_modules/qunit/bin/cli.js
qunit@0.5.9 /usr/local/lib/node_modules/qunit 
├── tracejs@0.1.4
├── argsparser@0.0.6
├── underscore@1.3.3
└── cli-table@0.0.2

$ qunit -h

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot find module 'bunker'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/qunit/lib/coverage.js:1:76)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)

$ npm install -g bunker
bunker@0.1.2 /usr/local/lib/node_modules/bunker 
└── burrito@0.2.12

$ qunit -h

Usage: cli [options] value (boolean value can be used)

Options:
 -c, --code path to code you want to test
 -t, --tests path to tests (space separated)
 -d, --deps dependency paths - files required before code (space separated)
 -l, --log logging options, json have to be used
 --cov create tests coverage report
 -h, --help show this help
 -v, --version show module version
@kof
Owner

Well, the question is why is bunker not installed on your maschine, npm should have tried to install it. Currently its not even in use.

@joebain

NPM didn't install bunker when I installed qunit. The version of qunit currently in NPM crashes if bunker isn't installed. Bunker is not installed because it's optional in the package.json. I don't know why qunit crashes without bunker installed.

@kof
Owner

Actually npm installs optional dependencies always, just in case it is not able to install them, it will install the module without this dependency. So normally you are getting bunker installed.

@kof
Owner

So

  1. the root reason is you are not getting bunker installed
  2. it is optional, so I can handle this case and don't throw.
@kof kof closed this issue from a commit
@kof closes #59 dont throw if optional module is not installed, print an e…
…rror if one is trying to use it.
333d890
@kof kof closed this in 333d890
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.