Jspdf: npm install issue with package.json

Created on 31 Dec 2018  路  4Comments  路  Source: MrRio/jsPDF

How to reproduce the issue?

copy the below package.json and run npm install

{
  "name": "test-jspdf",
  "version": "1.0.0",
  "dependencies": {
    "jspdf": "*"
  }

}

Environment:

node version: v8.15.0
npm version: 6.4.1

Issue:

node modules are not installed with below error:

npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t ssh://[email protected]/eligrey/FileSaver.js.git
npm ERR! 
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR! 
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-31T12_00_53_251Z-debug.log

As we dont have git installed in app servers this is an issue in building the module.
Is there any alternate way to disable git and load through npm ?

Most helpful comment

Seems like the confusion in this is to blame. I think it's very unexpected behavior to have git suddenly be required by a npm package so it's reasonable to ask about this.

For those who don't want to install git, seems like using jspdf 1.5.2 is a good work around. @BarathArivazhagan you can just do this in your package.json - notice the lack of ^ or ~ to ensure you get exactly this version.

"jspdf": "1.5.2",

All 4 comments

@arasabbasi Could you please provide minimal configuration using resolutions with npm to fix the issue ?

Hey and thanks for posting this! This issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.

Seems like the confusion in this is to blame. I think it's very unexpected behavior to have git suddenly be required by a npm package so it's reasonable to ask about this.

For those who don't want to install git, seems like using jspdf 1.5.2 is a good work around. @BarathArivazhagan you can just do this in your package.json - notice the lack of ^ or ~ to ensure you get exactly this version.

"jspdf": "1.5.2",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MelanieCroce picture MelanieCroce  路  4Comments

0721Betty picture 0721Betty  路  4Comments

mackersD picture mackersD  路  4Comments

NoFootDancer picture NoFootDancer  路  3Comments

baluMallisetty picture baluMallisetty  路  4Comments