node-signpdf icon indicating copy to clipboard operation
node-signpdf copied to clipboard

Could not resolve dependency with [email protected]

Open Ryxuu opened this issue 1 year ago • 3 comments

Describe the bug and the expected behaviour I am using [email protected]. When I try to istall @signpdf/placeholder-pdfkit the installation process fails with

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/pdfkit
npm ERR!   pdfkit@"^0.15.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer pdfkit@"^0.11.0" from @signpdf/[email protected]
npm ERR! node_modules/@signpdf/placeholder-pdfkit
npm ERR!   @signpdf/placeholder-pdfkit@"*" from the root project

Is it a bug in signing or in the helpers? It shows up with placeholder-pdfkit helper.

To Reproduce Using pdfKit with version greater than 0.11.0 the dependency error appears if you try to install placeholder-pdfkit.

Ryxuu avatar Mar 27 '24 07:03 Ryxuu

this is a quirk of Semantic Versioning: placeholder-pdfkit has a peer dependency of pdfkit "^0.11.0", which means "0.11.x" (because the version is lower than "1.0.0")

to allow all versions "0.x.y" for x>=11, you actually want the reference to be something like ">=0.11.0 <1.0.0"

Dmitrijs-Sakovics avatar Mar 27 '24 11:03 Dmitrijs-Sakovics

We have to fix that

vbuch avatar Mar 27 '24 12:03 vbuch

Not sure if this is related, but adding the @signpdf/placeholder-plain to my project adds 118 packages! Not seeing where in the dependency tree of the packages specified in the package.json of either ...plain and ...pdfkit010 that all of these dependencies are necessary. That kind of bloat significantly forced me to revert to using the pdf-lib placeholder implementation even though it doesn't support multiple signers. Please help and advise.

tfrancois avatar Jul 07 '24 05:07 tfrancois