Problem getting bower install work with TFS Git using HTTP

1,052 views
Skip to first unread message

Chris Sundberg

unread,
Feb 12, 2014, 8:06:01 AM2/12/14
to twitte...@googlegroups.com
Hi,
I'm using TFS Git and it requires that I use HTTP.
Using git clone http://<host>:<port>/tfs/../../_git/<repo> works without any issues.
But running bower install with that URL produces this error: 

<package-name> ENORESTARGET URL sources can't resolve targets

Stack trace:
Error: URL sources can't resolve targets
    at createError (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\lib\util\createError.js:4:15)
    at new UrlResolver (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\lib\core\resolvers\UrlResolver.js:19:15
)
    at C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\lib\core\resolverFactory.js:24:16
    at Promise.spread (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:1186:26)
    at _fulfilled (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:798:54)
    at Promise.then.self.promiseDispatch.done (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:827:30)
    at Promise.promise.promiseDispatch (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:760
:13)
    at promise.promiseDispatch (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:526:49)
    at flush (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:108:17)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Console trace:
Trace
    at StandardRenderer.error (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\lib\renderers\StandardRenderer.j
s:74:17)
    at Logger.<anonymous> (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\bin\bower:109:18)
    at Logger.EventEmitter.emit (events.js:96:17)
    at Logger.emit (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\bower-logger\lib\Logger.js:29:
39)
    at C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\lib\commands\install.js:27:16
    at _rejected (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:808:24)
    at Promise.then.self.promiseDispatch.threw (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\
q.js:834:30)
    at Promise.when (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:1079:31)
    at Promise.promise.promiseDispatch (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:752
:41)
    at messages (C:\Users\CHSU7648\AppData\Roaming\npm\node_modules\bower\node_modules\q\q.js:574:44)

System info:
Bower version: 1.2.8
Node version: 0.8.19
OS: Windows_NT 6.1.7601 ia32

And I can't use the .git ending on the URL, cause to my understanding that's not how TFS Git works (it won't find anything there).
Based on the stack trace and the little info i could find on the web I think the problem has to do with the resolver and I suspect that it only takes some configuration to fix it?
However I don't have a clue what I should configure (.bowerrc, Git or TFS)?

Would be very grateful if anyone could tell me what I'm doing wrong and how I can fix it.

Diogo Simões

unread,
Mar 10, 2015, 7:56:55 AM3/10/15
to twitte...@googlegroups.com
Hi Chris,

I'm having the same problem as you and I would like to know if you fixed it in the meanwhile.

Thanks,
Diogo

Chris Sundberg

unread,
Mar 11, 2015, 9:18:15 AM3/11/15
to twitte...@googlegroups.com
Hi Diogo,

Sadly I have not managed to solve the problem and now I'm moving to a new project with a different environment.
However, I think what you might need to do is setup your own private Bower registry and have your build script update the registry version from the build server.
But that is just me guessing.

Diogo Simões

unread,
Mar 13, 2015, 6:48:00 AM3/13/15
to twitte...@googlegroups.com
Thank you Chris, 

If I find something useful about this subject I'll post it here.

Best regards.

Mattias Kihlström

unread,
May 5, 2015, 3:39:36 AM5/5/15
to twitte...@googlegroups.com
Adding git+ before https solves the problem, like this:

If running in Package Manager Console in Visual Studio you may not get prompted for username and password and the command hangs. To fix this first run
git config --global credential.helper wincred
in the Windows Command Prompt, do a bower install (or git clone) from the same host still in WIndows Command Prompt and answer the login prompts and the credentials will then be saved and used automatically also when using bower in the Package Manager Console.

Cheers! :)
Reply all
Reply to author
Forward
0 new messages