question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

file-saver package-lock method requires ssh to github

See original GitHub issue

Thank you for submitting an issue to jsPDF. Please read carefully.

Are you using the latest version of jsPDF? I had to rollback to 1.4.1 because of this bog

Have you tried using jspdf.debug.js?

Steps to reproduce just compile from somewhere you don’t have direct ssh access to github

Ideally a link too. Try fork this http://jsbin.com/rilace/edit?html,js,output

What I saw

15:49:10 npm ERR! Error while executing:
15:49:10 npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git
15:49:10 npm ERR!
15:49:10 npm ERR! ssh: Could not resolve hostname github.com: Name or service not known
15:49:10 npm ERR! fatal: Could not read from remote repository.
15:49:10 npm ERR!
15:49:10 npm ERR! Please make sure you have the correct access rights
15:49:10 npm ERR! and the repository exists.
15:49:10 npm ERR!
15:49:10 npm ERR! exited with error code: 128

What I expected No ssh git access, only https method

My analysis Not an npm expert but i saw this change btw 1.4.1 and 1.5.3 and 1.5.3 does’nt seem standard : in package-lock.json: 1.4.1

    "file-saver": {
      "version": "1.3.8",
      "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz",
      "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg=="
    },
    "file-saver": {
     "version": "github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e",
     "from": "github:eligrey/FileSaver.js#1.3.8"
    },

npmjs.org registry should probably be used instead of github ? this is the only package using this method.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:24
  • Comments:80

github_iconTop GitHub Comments

27reactions
lcbdlcommented, Sep 30, 2019

This is a pain!!!

17reactions
hfcarbonellcommented, Aug 16, 2019

We are also unable to use git on our servers. I wasn’t able to rollback to version 1.4.1 due to problems with using “addImage”.

I found a temporary work around that might help other people:

  1. I added file-saver directly to my package.json:
    "file-saver": "^2.0.2",
  1. I updated my package-lock.json’s jspdf entry 2a. Remove file-saver entry from the jspdf.requires section 2b. Update the jspdf.dependencies.file-saver: Remove resolved and integrity, Update “version” to say “2.0.2”
    "jspdf": {
      "version": "1.5.3",
      "resolved": "...",
      "integrity": "...",
      "requires": {
        "canvg": "1.5.3",
        "html2canvas": "1.0.0-alpha.12",
        "omggif": "1.0.7",
        "promise-polyfill": "8.1.0",
        "stackblur-canvas": "2.2.0"
      },
      "dependencies": {
        "file-saver": {
          "version": "2.0.2"
        }
      }
    },
  1. Delete node_modules package
  2. Run npm install

The npm install auto filled out the dependencies section of my package-lock.json for jspdf without using git

After that, it stopped trying to find file-saver through git and is working.

This is a horrible work around- but it helped us keep going until a version of jspdf is released that doesn’t require git.

Read more comments on GitHub >

github_iconTop Results From Across the Web

file-saver package-lock method requires ssh to github #2208
Have you tried using jspdf.debug.js? Steps to reproduce just compile from somewhere you don't have direct ssh access to github. Ideally a link ......
Read more >
Developers - file-saver package-lock method requires ssh to github -
Coming soon: A brand new website interface for an even better experience!
Read more >
Cannot install with npm package from git - Stack Overflow
For whatever reason when asking for public (!) repo it needs key. But... An SSH URL would always require a public key in...
Read more >
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com
First make sure ssh -T git@github.com does work, meaning you do have the ... parallax/jsPDFfile-saver package-lock method requires ssh to github#2208.
Read more >
Npm Install Shows Error With Git Not Found - ADocLib
You need to install git in your machine to have it working. undefined lsremote h t ssh://git@github.com/eligrey/FileSaver.js.git it should have been git lsr....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found