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

Bower fails on invalid version numbers (TypeError: Invalid Version) #246

Closed
tjama opened this issue Jun 27, 2016 · 3 comments
Closed

Bower fails on invalid version numbers (TypeError: Invalid Version) #246

tjama opened this issue Jun 27, 2016 · 3 comments

Comments

@tjama
Copy link

tjama commented Jun 27, 2016

ncu version 2.6.7 on Windows 7, node v6.2.2

C:\DEV>ncu -m bower
Unhandled rejection TypeError: Invalid Version: 2.2-jsdw
    at new SemVer (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:273:11)
    at compare (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:460:10)
    at Object.neq (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:504:10)
    at GitHubResolver.GitResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers
\GitResolver.js:209:56)
    at GitHubResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers\GitHubResol
ver.js:134:53)
    at _fulfilled (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:79
6:13)
    at C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:604:44
    at runSingle (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:137:13)
    at flush (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
@raineorshine
Copy link
Owner

It appears that one of your dependencies is using a version number that is
not valid semver: 2.2-jsdw. npm-check-updates only works for packages that
use valid semver versions. It's unfortunate that the error does not reveal
the name of the transgressing package, but you can find that by removing
dependencies one by one until the error goes away. I suggest contacting the
package author or making a pull request to request a valid semver version.
On Mon, Jun 27, 2016 at 2:59 AM tjama notifications@github.com wrote:

ncu version 2.6.7 on Windows 7, node v6.2.2

C:\DEV>ncu -m bower
Unhandled rejection TypeError: Invalid Version: 2.2-jsdw
at new SemVer (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:273:11)
at compare (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:460:10)
at Object.neq (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\semver\semver.js:504:10)
at GitHubResolver.GitResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers
\GitResolver.js:209:56)
at GitHubResolver._savePkgMeta (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers\GitHubResol
ver.js:134:53)
at _fulfilled (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:79
6:13)
at C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:604:44
at runSingle (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:137:13)
at flush (C:\Users\jamat\AppData\Roaming\npm\node_modules\bower\lib\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#246, or mute the
thread
https://github.com/notifications/unsubscribe/AAtyxEK56OEmwFLnaaXjJiiyLBjsFnGwks5qP5DygaJpZM4I-4wC
.

@GvS666
Copy link

GvS666 commented Jun 29, 2016

I've made a PR in bower to fix this issue: bower/bower#2316

@raineorshine raineorshine changed the title Error when checking bower Bower fails on invalid version numbers (TypeError: Invalid Version) Jun 29, 2016
@raineorshine
Copy link
Owner

Great!

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

3 participants