dominic-p / videojs-resolution-selector

Adds a resolution selector button to Video.js to allow users to manually adjust the video quality.
MIT License
88 stars 31 forks source link

Bower install fails with SemVer error #32

Closed robatosan closed 9 years ago

robatosan commented 9 years ago

Bower install fails with the following error:

bower videojs-resolution-selector#1.6.1            error Invalid Version: 1.5

Stack trace:
TypeError: Invalid Version: 1.5
    at new SemVer (/usr/local/lib/node_modules/bower/node_modules/semver/semver.js:273:11)
    at compare (/usr/local/lib/node_modules/bower/node_modules/semver/semver.js:460:10)
    at Object.neq (/usr/local/lib/node_modules/bower/node_modules/semver/semver.js:504:10)
    at GitHubResolver.GitResolver._savePkgMeta (/usr/local/lib/node_modules/bower/lib/core/resolvers/GitResolver.js:224:56)
    at GitHubResolver._savePkgMeta (/usr/local/lib/node_modules/bower/lib/core/resolvers/GitHubResolver.js:134:53)
    at _fulfilled (/usr/local/lib/node_modules/bower/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/bower/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:796:13)
    at /usr/local/lib/node_modules/bower/node_modules/q/q.js:604:44
    at runSingle (/usr/local/lib/node_modules/bower/node_modules/q/q.js:137:13)

Console trace:
Error
    at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:82:37)
    at Logger.<anonymous> (/usr/local/lib/node_modules/bower/bin/bower:110:22)
    at Logger.emit (events.js:107:17)
    at Logger.emit (/usr/local/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /usr/local/lib/node_modules/bower/lib/commands/index.js:45:20
    at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:844:24)
    at /usr/local/lib/node_modules/bower/node_modules/q/q.js:870:30
    at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:788:41)
    at /usr/local/lib/node_modules/bower/node_modules/q/q.js:604:44
System info:
Bower version: 1.5.2
Node version: 0.12.5
OS: Darwin 14.5.0 x64

It's not enough to bump the version in package.json. It needs to be adjusted in bower.json as well!

dominic-p commented 9 years ago

Thanks for the heads up. I'm not really familiar with bower. Do you know if the version in bower.json needs to match package.json or the latest GitHub release or both or neither?

robatosan commented 9 years ago

I would guess it should match the git tag's version, so when putting out a new release both files should be updated. But otherwise they are totally independent. Anyway it's weird, because even if i use a git address with tag in the version field of the bower.json of my project, bower seems to use the version stated in your bower.json instead of ignoring it.

dominic-p commented 9 years ago

Hmm, interesting. Well, I went ahead and updated bower.json to match package.json. So, now both files show version 1.6.2, while the latest release tag is 1.6.1. Maybe give it another try and see what happens?

robatosan commented 9 years ago

Unfortunately that's not enough. You also have to create a new tag with that version.

dominic-p commented 9 years ago

Good to know. I went ahead and made a release for version 1.6.2. Want to give it another try to see if that makes bower happy?

robatosan commented 9 years ago

bower seems to be very happy :)

dominic-p commented 9 years ago

That's good to hear. I'll just have to try to remember to bump the version in 3 places now instead of 1. Yay for package management.