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

ERROR: Not found #148

Open
moazam1 opened this issue Jan 1, 2022 · 2 comments
Open

ERROR: Not found #148

moazam1 opened this issue Jan 1, 2022 · 2 comments

Comments

@moazam1
Copy link

moazam1 commented Jan 1, 2022

Hi, thanks for creating awesome package. I am not a node pro so trying to understand why below code is throwing: ERROR: not found error. I have taken following code from your docs:

const nodeHtmlToImage = require('node-html-to-image');
nodeHtmlToImage({
    output: './image.png',
    html: `<html>
    <head>
      <style>
        body {
          width: 2480px;
          height: 3508px;
        }
      </style>
    </head>
    <body>Hello world!</body>
  </html>
  `
})
    .then(() => console.log('The image was created successfully!'))

When I run above code node index.js it generates the image file but I also get this error:

ERROR: Not found

and then I have to press control+c to exit the program. Any idea what am I doing wrong? Thanks once again for your help.

@frinyvonnick
Copy link
Owner

Hi @moazam1 👋

Thank you for opening this issue. Can you share the stacktrace of the error please?

@moazam1
Copy link
Author

moazam1 commented Feb 15, 2022

@frinyvonnick Hi, thank you for the reply.

I am using the sample code from your repo:

const nodeHtmlToImage = require('node-html-to-image')

nodeHtmlToImage({
  output: './image.png',
  html: '<html><body>Hello world!</body></html>'

When I execute the code I get following error:

$ node test.js
ERROR: Not found

Though the process does not terminate automatically but I see image generated.

I am using node: v16.13.1 and npm@8.4.0

I am using temporary solution. Ignoring error not found error and using setimeout to terminate the script. Bit hacky but it works.

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

No branches or pull requests

2 participants