bower build failing to execute git ls

455 Views Asked by At

I have a bower install build step which throws an error for this file:

bower file-saver.js#~1.20150507.2

Error:

ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/Teleborder/FileSaver.js.git", exit code of #128 fatal: Cannot prompt because user interactivity has been disabled. fatal: Cannot prompt because user interactivity has been disabled. remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/Teleborder/FileSaver.js.git/'

Given all I need to do is fix a build step and I do have (or wish to use) a git PAT, how can I resolve this error? I am not directly referencing the specified version of the bower package, either, so this is a dependency I can't control (AFAIK).

3

There are 3 best solutions below

0
Ceeno Qi-MSFT On

According to this blog, the Bower has been gradually faded away out from Oct. 2017.

And we have a workaround for you 

1.You could remove your file saving line in bower json file

2.Installing this npm package, with "npm install --save [email protected]"

0
L at Tegonal On

There are several problems with this approach: As @ceeno-qi-msft mentioned, Bower is not supported any more...

But the trivial reason why it's not working at this time is, that the Teleborder/FileSaver.js.git repo was deleted :(

0
Jason On

As Lat Tegonal has mentioned, it is because Teleborder/FileSaver.js git repo was deleted. I tried to solve it with npm, but I could not figure out how to get rid of the errors. As such, I solved it by creating a script tag with CDN address in the index.html that gets served from the server. Use the first bundle.min.js from below:

https://cdnjs.com/libraries/angular-file-saver

And insert this tag: <script src='https://cdnjs.cloudflare.com/ajax/libs/angular-file-saver/1.1.3/angular-file-saver.bundle.min.js'></script>

into your index.html. For me, it was in server/views folder, may or may not be the same for you.

I hope this helps someone - a rather niche issue and took a while to solve.