Bower install fails to find satisfying version, although there is a matching tag on GitHub
Asked Answered
B

2

15

I am having problems installing bower dependencies on a Windows installation. Installation fails for me on Windows 7 x64, with git 2.6.4.windows.1, node v5.4.1, npm 3.3.12, bower 1.7.2.

It works for a colleague on OSX (git 2.5.4, node v4.1.1, npm 2.14.4, bower 1.5.3) and for a colleague on Windows 10 (git 2.5.0.windows.1, node v4.2.2, npm 2.14.7, bower 1.3.11).

The error message I am getting basically tells mit that bower-angular-translate does not have a version tag that satisfies 2.8.1, but the GitHub repository does have a version 2.8.1.
The failing packages are angular-ui-router, angular-local-storage and angular-translate.

I tried downgrading node to 0.10.x and 4.x.x and reinstalling bower, both did not work.

If anyone has experienced the same error message behavior with bower (on windows?) and has successfully solved it, any pointers would be greatly appreciated.


The error message after running bower install:

bower angular-translate#~2.8.1    ENORESTARGET No tag found that was able to satisfy ~2.8.1

Additional error details:
No versions found in git://github.com/PascalPrecht/bower-angular-translate.git

My bower.json:

{
    "name": "My App Name",
    "version": "0.0.1",
    "dependencies": {
        "angular": "1.4.7",
        "angular-animate": "1.4.7",
        "angular-aria": "1.4.7",
        "angular-cookies": "1.4.7",
        "angular-resource": "1.4.7",
        "angular-sanitize": "1.4.7",
        "angular-material": "0.11.2",
        "angular-ui-router": "0.2.5",
        "angular-local-storage": "0.2.x",
        "angular-translate": "~2.8.1"
    }
}

Just in case, my package.json:

{
	"author": "My Name",
	"name": "My App Name",
	"version": "0.0.1",
	"dependencies": {},
	"devDependencies": {
		"chai": "2.2.0",
		"gulp": "3.9.x",
		"gulp-angular-filesort": "1.1.1",
		"gulp-bower-files": "0.1.x",
		"gulp-clean": "0.2.x",
		"gulp-debug": "2.1.x",
		"gulp-concat": "2.2.x",
		"gulp-filter": "1.0.x",
		"gulp-inject": "0.4.x",
		"gulp-less": "1.2.3",
		"gulp-livereload": "1.3.x",
		"gulp-tsc": "0.10.x",
		"gulp-uglify": "1.2.x",
		"gulp-util": "2.2.x",
		"gulp-watch": "0.6.x",
		"karma-coverage": "~0.2.4",
		"karma-mocha": "~0.1.6",
		"karma-phantomjs-launcher": "^0.1.4",
		"karma-sinon-chai": "~0.2.0",
		"merge-stream": "0.1.x",
		"mocha": "~1.20.1",
		"phantomjs": "^1.9.17",
		"q": "1.0.x",
		"run-sequence": "0.3.x"
	}
}
Brambling answered 19/1, 2016 at 10:49 Comment(8)
I just tried on my PC and works like a charm. Try to remove the bower cache (rm -rf ~/.cache/bower on Linux). Try also to run it in another directory, like /tmp (I'm just wondering here...)Tenor
What terminal do you use? The Windows one or a replacement?Rosaceous
@Tenor cleaning the cache via bower cache clean or deleting %LOCALAPPDATA%\bower\cache (the Windows variant of the path you provided) did not help. The error message hints that git *can not find a tag 2.8.1 when there is one`.Brambling
@Andra I am using git-bash included with git for windows (64bit build). Git, bower, npm are all reachable within my PATH. Running via cmd.exe didn't work either.Brambling
Did you try to change the git protocol from git to https by executing: git config --global url."https://".insteadOf git:// ?Rosaceous
For me npm 3 has cause countless problems on windows. Try to downgrade npm to version 2 and see if that works for you as well. If downgrading doesn't work, you can remove completely node/npm/bower and then use an older node installer.Androgynous
@MariusP. thanks for the recommendation, but as stated above, I tried downgrading node to 0.10.x and 4.x.x and reinstalling bower, both did not work.Brambling
@LeonAdler glad it was helpfulRosaceous
B
1

GitHub revoked my SSH keys, causing git clone to fail.

Since cloning repositories via git clone --branch <tagname> https://<repo> at the "missing" tag worked, I understood from the error message that bower was not able to find the tag.

Both my bash from msys-git and my cmd.exe were set up to use Putty's plink.exe, while bower was trying to connect via OpenSSH. Putty was set up with the correct private key, OpenSSH was not.

The culprit here was GitHub, which removed my SSH public key from my profile, making git clone via SSH (which is the default for bower install) fail with a Permission denied (publickey).

All your SSH keys are belong to us

The combination of GitHub not sending me a notification email about this and the bower error message describing an entirely different error made error-tracing this a nightmare.


Kudos go to Andra for the comment to use git config --global url."https://".insteadOf git://. While not suitable as a permanent solution (my company's git server enforces SSH, since it is superior to a simple user-password combination), it helped limit the problem to the SSH access.

Brambling answered 28/1, 2016 at 10:47 Comment(0)
R
1

Try to change the git protocol from git to https by executing:

git config --global url."https://".insteadOf git://
Rosaceous answered 28/1, 2016 at 10:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.