Skip to content

Instantly share code, notes, and snippets.

@joshfrench
Last active March 28, 2016 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfrench/2fd6572e20fd978e78cb to your computer and use it in GitHub Desktop.
Save joshfrench/2fd6572e20fd978e78cb to your computer and use it in GitHub Desktop.

Starting with a fresh checkout of imgix.js and the following versions:

  • Node v5.4.0
  • NPM 3.8.3
$ npm i
> precommit-hook@2.0.1 install /Users/josh/src/imgix.js/node_modules/precommit-hook
> node bin/install

Error: ENOENT: no such file or directory, open '/Users/josh/src/imgix.js/.git/hooks/pre-commit'

[npm install noise...]

npm WARN karma-phantomjs-launcher@0.2.3 requires a peer of phantomjs@>=1.9 but none was installed.
npm WARN karma-requirejs@0.2.6 requires a peer of requirejs@^2.1.0 but none was installed.

precommit-hook makes some assumptions, ok...

$ mkdir .git/hooks
$ npm i

> precommit-hook@2.0.1 install /Users/josh/src/imgix.js/node_modules/precommit-hook
> node bin/install

imgix.js@2.1.0 /Users/josh/src/imgix.js
├── UNMET PEER DEPENDENCY phantomjs@>=1.9
├─┬ precommit-hook@2.0.1 
│ └── git-validate@1.2.1 
└── UNMET PEER DEPENDENCY requirejs@^2.1.0

npm WARN karma-phantomjs-launcher@0.2.3 requires a peer of phantomjs@>=1.9 but none was installed.
npm WARN karma-requirejs@0.2.6 requires a peer of requirejs@^2.1.0 but none was installed.

Let's ignore those peer deps for now

$ grunt test                                                                                                                     module.js:328
    throw err;
    ^

Error: Cannot find module 'glob'

I'm pretty sure glob is due to the version of node and/or npm I'm on, though

$ npm i -g glob
$ grunt test

Running "build" task

Running "copy-core" task

Running "concat:js" (concat) task
File /Users/josh/src/imgix.js/dist/imgix.js created.

Running "uglify:imgixjs" (uglify) task
>> 1 file created.

Running "uglify:jqueryplugin" (uglify) task
>> 1 file created.

Running "karma:unit" (karma) task
WARN [plugin]: Error during loading "/Users/josh/src/imgix.js/node_modules/karma-phantomjs-launcher" plugin:
  Cannot find module 'phantomjs'
WARN [plugin]: Error during loading "/Users/josh/src/imgix.js/node_modules/karma-requirejs" plugin:
  Cannot find module 'requirejs'
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [Chrome 49.0.2623 (Mac OS X 10.11.3)]: Connected on socket SU83s_j6kqjtF-zQN1pK with id 36950246
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 25 of 146 SUCCESS (0 secs / 1.106 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 45 of 146 SUCCESS (0 secs / 3.516 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3) .fluid Firing onLoad callbacks fires an onLoad callback initially FAILED
        Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
        Expected spy unknown to have been called.
            at Object.<anonymous> (/Users/josh/src/imgix.js/tests/fluid_test.js:86:28)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 46 of 146 (1 FAILED) DISCONNECTED (16.682 secs / 13.523 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 46 of 146 (1 FAILED) DISCONNECTED (16.682 secs / 13.523 secs)
Firefox 42.0.0 (Mac OS X 10.11.0): Executed 25 of 146 DISCONNECTED (17.283 secs / 7.257 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

Maybe it's those missing peers?

$ npm i requirejs@2.1.0 phantomjs@2.1.3

phantomjs@2.1.3 matches my system install of phantomjs 2.1.1, although I've tried it with both 1.9.8 and 1.9.2 with the same results:

$ grunt test

Running "build" task

Running "copy-core" task

Running "concat:js" (concat) task
File /Users/josh/src/imgix/dist/imgix.js created.

Running "uglify:imgixjs" (uglify) task
>> 1 file created.

Running "uglify:jqueryplugin" (uglify) task
>> 1 file created.

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [Chrome 49.0.2623 (Mac OS X 10.11.3)]: Connected on socket EUwkatslq7MdHNp5UjhH with id 78388564
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 35 of 146 SUCCESS (0 secs / 1.63 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 45 of 146 SUCCESS (0 secs / 1.641 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 45 of 146 DISCONNECTED (12.191 secs / 1.641 secs)
Chrome 49.0.2623 (Mac OS X 10.11.3): Executed 45 of 146 DISCONNECTED (12.191 secs / 1.641 secs)
Firefox 42.0.0 (Mac OS X 10.11.0): Executed 45 of 146 DISCONNECTED (15.761 secs / 2.469 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

Tests halt at the same point as above (although it doesn't log the test failure, which may be interesting.)

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