FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

Private package issue?

Open fingerskier opened this issue 3 years ago • 19 comments

This shows up in my dependency tree after an update: ├── [email protected] (git+ssh://[email protected]/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e)

...which kills the CD workflow because it doesn't have access. Is there a workaround? The root package is actually jspdf so do I need to go to them?

fingerskier avatar May 07 '21 14:05 fingerskier

Same here, [email protected] uses 1.3.8 from Github, but then fails because the tarball doesn't have the files in the root directory:

npm ERR! Could not install from "node_modules/jspdf/file-saver@github:eligrey/FileSaver.js#1.3.8" as it does not contain a package.json file.

If @eligrey could update the assets for that release on Github it would be 💯 🎉 .

Sleavely avatar Jun 10 '21 14:06 Sleavely

@Sleavely how could they update it when it points to specific commit (e865e37) ? ~~but jspdf could point it to a different commit that does have package.json~~ actually, wait a sec - that commit does have package.json

this command

npm install git+ssh://[email protected]/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e

works just fine for me / ¢5

makc avatar Jun 11 '21 01:06 makc

@makc Fair question :) Like you discovered, the actual commit/tag is fine and that's why I suspect that it's trying to download the zip or tarball from the release page.

~~When you create a release on Github you have the ability to upload individual files such as compiled binaries or zipfiles, and those are - as far as I know - possible to edit retroactively because the release page is basically just a blog post managed independently from Git.~~

Edit: Looks like the source archives on the release page are automatically generated by Github, so NPM should be used to their format.. What the heck.

Sleavely avatar Jun 11 '21 07:06 Sleavely

Like @makc above, installing it explicitly seems to do the trick, for somereason 😕

npm i 'file-saver@github:eligrey/FileSaver.js#1.3.8'

Sleavely avatar Jun 11 '21 07:06 Sleavely

Is this resolved ? I deleted my package-lock.json and reran the npm install command. that seemed to work for me

revatim avatar Jun 28 '21 09:06 revatim

Any permament fix? I am hitting this when using jspdf

ziaulrehman40 avatar Jul 26 '21 17:07 ziaulrehman40

+1 @ziaulrehman40
I got the same error, when using jspdf any solution for this ?

AninditaDe avatar Aug 04 '21 12:08 AninditaDe

encountering similar issue, i can get to install correctly locallly, but fails when i try to npm install in production on heroku

igorya76 avatar Sep 14 '21 02:09 igorya76

I can confirm that this works locally but still encounters the same error message in my Gitlab CI. Did anyone have any luck updating to the latest versions and see if that helps?

Qarun-Qadir-Bissoondial avatar Mar 10 '22 16:03 Qarun-Qadir-Bissoondial

I came across this same issue today. Adding the the dependency to my package.json file as suggested by @Sleavely did the trick for me. I never had problems with building my repo locally, only in my CI process.

wdgrantham avatar Mar 10 '22 23:03 wdgrantham

I also have this problem in my CI build to heroku, I tried to add it as a normal dependency and as resolution, it didn't work, was anyone able to fix it?

Beltarm avatar Mar 12 '22 18:03 Beltarm

I'll make a new release soon to fix this

eligrey avatar Mar 12 '22 19:03 eligrey

Hi Team, I got this issue when my friend installed qrcode.react in the project. so in his system he use (node version: 16.14.2) In my system I used node version (12.18.3). so when tried to run "npm i" I got above error. Issue fixed in my system:

  1. I removed node_modules folder and installed node 16.14.2 version in my system & run "npm i" it's working fine now(here both my friend and Mine systems are UBUNTU versions).

NOTE: In mac I did not get any issue even my node version is 14.7.0 . So I tried in my ubuntu system with 14.7.0 node version no luck.

kodali444 avatar Aug 12 '22 12:08 kodali444

This resolved my issue, it was related to deploying on Vercel, I don't even know why but doing this fixed my deployment 👇🏽 https://github.com/eligrey/FileSaver.js/issues/702#issuecomment-859357568

didierganthier avatar Mar 03 '23 15:03 didierganthier

Haré una nueva versión pronto para arreglar esto.

:C

Diaz006 avatar May 11 '23 22:05 Diaz006

Hi all. I've got the same error on aws yesterday - deleting package-lock.json (revatim commented on Jun 28, 2021) and installing version 1.3.8 (Sleavely commented [on Jun 11, 2021) didn't help. I'll appreciate for any updated solution of this error.

maksxp avatar Jun 16 '23 11:06 maksxp

Is this resolved ? I deleted my package-lock.json and reran the npm install command. that seemed to work for me

aqibbasheer avatar Jul 11 '23 09:07 aqibbasheer

Hi all. I've got the same error on aws yesterday - deleting package-lock.json (revatim commented on Jun 28, 2021) and installing version 1.3.8 (Sleavely commented [on Jun 11, 2021) didn't help. I'll appreciate for any updated solution of this error.

finally this issue has been fixed by updating package-lock.json BEFORE ......... "jspdf": { ..... , "requires": { "file-saver": "file-saver@github: https: // github.com /eligrey /FileSaver.js /issues /1.3.8", ........

AFTER ........ "jspdf": { ..... , "requires": { "file-saver": "^2.0.1", // the same version as in my package.json file ........

Hope it will help someone )))

maksxp avatar Jul 11 '23 11:07 maksxp

@maksxp Could you share your commands?

I tried to delete node_modules and package-lock.json and after installing packages still having in lock:

jspdf": {
      "version": "1.5.3",
      "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-1.5.3.tgz",
      "integrity": "sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw==",
      "requires": {
        "canvg": "1.5.3",
        "file-saver": "github:eligrey/FileSaver.js#1.3.8",
        "html2canvas": "1.0.0-alpha.12",
        "omggif": "1.0.7",
        "promise-polyfill": "8.1.0",
        "stackblur-canvas": "2.2.0"
      },
      "dependencies": {
        "file-saver": {
          "version": "github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e",
          "from": "github:eligrey/FileSaver.js#1.3.8"
        }
      }
    }

OlegZavrazhin avatar Aug 14 '24 15:08 OlegZavrazhin