rse / node-prince

Node API for executing PrinceXML via prince(1) CLI
https://npmjs.com/prince
49 stars 24 forks source link

Installation error on Linux CI build server #18

Closed timtribers closed 6 years ago

timtribers commented 6 years ago

Hi @rse

Since originally posting about this, I've been running successfully by installing Prince separately before running Node. However, as of the beginning of Oct 2017, that approach has broken (gdebi-core has fallen out of the Ubuntu repository!!), so I've been playing around with getting it working the 'proper' way - i.e. letting node-prince handle the install.

This seems to work fine.

> node ./prince-npm.js install

++ checking for globally installed PrinceXML
++ downloading PrinceXML distribution
-- download: http://www.princexml.com/download/prince-11.3-ubuntu14.04-amd64.tar.gz

-- download: 5976344 bytes received.
++ locally unpacking PrinceXML distribution
-- OK: local PrinceXML installation now available

But when it came to generating a pdf (using grunt-princess), it was failing with:

Running "princess:main" (princess) task
Warning: Prince#execute: cannot resolve binary "prince" to a filesystem path Use --force to continue.

I set the binary option to '/usr/local/bin', which got me further. But now i get the failure:

Running "princess:main" (princess) task
Fatal error: PrinceXML failed to generate "./dist/BG Proof.pdf":
| Error: spawn EACCES

I'm thinking that this is an OS permissions issue. Any idea how to go about fixing it?

Thanks.

rse commented 6 years ago

The binary is not the path to the directory where the executable stays, but the path to the executable itself. The extraction of the downloaded tarball should be now fixed, too.

timtribers commented 6 years ago

Thanks @rse for taking a look.