Unable to resolve file-saver.js dependency file from bower install angular-file-saver
Asked Answered
B

2

18

I'm using the following command - bower install angular-file-saver --save , which has internal dependency on bower file-saver.js#~1.20150507.2. This dependency is not able to download as this is not available at this git url - https://github.com/Teleborder/FileSaver.js.git#~1.20150507.2.

It is showing the following error - ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/Teleborder/FileSaver.js.git", exit code of #128 fatal. Clicking on that link gives me a 404 error.

I can use the command bower install FileSaver --save and it downloads fine but it won't resolve for the dependency of bower install angular-file-saver.

Bedding answered 23/4, 2022 at 11:34 Comment(2)
I have same problem. How can I solve that problem?Uird
Seems like Teleborder changed their GitHub to be private... I'm trying to solve by redirecting bower to a different URL.Mert
P
23

I had the same issue,

Due to the aparently abandon of the original repo, I forked and create a new npm package ng-file-saver with the fix.

Basically y updated the FileSaver.js dependency, the rest of the code was no changed

https://www.npmjs.com/package/ng-file-saver

NPM

  • npm i ng-file-saver

BOWER

As Bower is deprecated, registering new Bower packages is not supported anymore. Neverthless you can install any GitHub repository as Bower package by putting full name in bower.json:

{
  "dependencies": {
    "angular-file-saver": "elquimeras/ng-file-saver#^1.1.4"
  }
}

You can install any dependency from github with CLI as well:

bower install elquimeras/ng-file-saver --save

Pembrook answered 25/4, 2022 at 14:12 Comment(1)
That's great. I solved same problem using this way.Uird
V
3

We were able to resolve by using the npm package rather than the bower one: https://www.npmjs.com/package/file-saver

  1. Remove the file-saver line from the bower.json file
  2. Install via npm (or yarn, or pnpm...): npm install --save [email protected]
Vituperate answered 25/4, 2022 at 11:24 Comment(1)
Is there a way to make the change in Tez source code? I couldn't execute the npm install.Meagan

© 2022 - 2024 — McMap. All rights reserved.