Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce and publish binaries for the asciidoctor-pdf executable #137

Closed
ggrossetie opened this issue Nov 29, 2019 · 2 comments · Fixed by #373
Closed

Produce and publish binaries for the asciidoctor-pdf executable #137

ggrossetie opened this issue Nov 29, 2019 · 2 comments · Fixed by #373

Comments

@ggrossetie
Copy link
Owner

Using pkg:

$ pkg package.json             
> pkg@4.4.0
> Targets not specified. Assuming:
  node10-linux-x64, node10-macos-x64, node10-win-x64
> Warning Malformed requirement for 'requirePath'
  /home/guillaume/workspace/opensource/asciidoctor/asciidoctor-pdf.js/lib/document/templates.js
> Warning Cannot include directory %1 into executable.
  The directory must be distributed with executable as %2.
  node_modules/puppeteer/.local-chromium
  path-to-executable/puppeteer
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/node-main/node-main.js
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/core/core.js
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/adaptors/liteDOM/liteDOM.js
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/node-main/node-main.js
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/core/core.js
> Warning Failed to make bytecode node10-x64 for file /snapshot/asciidoctor-pdf.js/node_modules/mathjax-full/components/src/adaptors/liteDOM/liteDOM.js
> Warning Failed to make bytecode node10-x64 for file C:\snapshot\asciidoctor-pdf.js\node_modules\mathjax-full\components\src\node-main\node-main.js
> Warning Failed to make bytecode node10-x64 for file C:\snapshot\asciidoctor-pdf.js\node_modules\mathjax-full\components\src\core\core.js
> Warning Failed to make bytecode node10-x64 for file C:\snapshot\asciidoctor-pdf.js\node_modules\mathjax-full\components\src\adaptors\liteDOM\liteDOM.js

As you can see there's a few warnings but overall it's working if you define the PUPPETEER_EXECUTABLE_PATH environment variable.

For instance:

$ PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser ./asciidoctor-pdf-linux examples/document/basic-example.adoc
@thom4parisot
Copy link
Collaborator

There are a few hints in vercel/pkg#204

@ggrossetie
Copy link
Owner Author

There are a few hints in vercel/pkg#204

Thanks!
I've read a few comments but I think it's OK to point to an external Chromium binary.
We could probably try to automatically resolve the executable path depending on the operating system if PUPPETEER_EXECUTABLE_PATH is not defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants