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

run with javascript and got CDP error #466

Open
ARHASSANI opened this issue Jul 12, 2023 · 3 comments
Open

run with javascript and got CDP error #466

ARHASSANI opened this issue Jul 12, 2023 · 3 comments

Comments

@ARHASSANI
Copy link

Hi
when I call and use it, got error in console
Uncaught (in promise) TypeError: CDP.New is not a function

sample code:
const html = '

Hello, world!

'

  const options = {
    port: 9222 // port Chrome is listening on
  }

  htmlPdf.create(html, options).then((pdf) => pdf.toBase64())
@ARHASSANI ARHASSANI changed the title javascript using and got CDP error run with javascript and got CDP error Jul 12, 2023
@westy92
Copy link
Owner

westy92 commented Jul 16, 2023

Could you please supply:

  • Node.js version
  • Platform (Windows, macOS, Linux, etc.)
  • html-pdf-chrome version

@ARHASSANI
Copy link
Author

ARHASSANI commented Jul 16, 2023

Node.js v18.16.1 and "node": ">= 18.14.2"
windows
"html-pdf-chrome": "^0.8.4"

@westy92
Copy link
Owner

westy92 commented Oct 1, 2023

Were you able to resolve this?

If not, could you please post more code, including your import statements?

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

No branches or pull requests

2 participants