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

Electron node-gyp canvas package not found. #942

Open
paragdiwan opened this issue Sep 8, 2020 · 4 comments
Open

Electron node-gyp canvas package not found. #942

paragdiwan opened this issue Sep 8, 2020 · 4 comments

Comments

@paragdiwan
Copy link

paragdiwan commented Sep 8, 2020

Bug report:
While I refer to https://webhint.io/docs/user-guide/troubleshoot/summary/ which explains about the issue with canvas,
While using it with electron , the electron-rebuild process gives an error when it doesn't found the relevant canvas package
716 error [email protected] install: node-pre-gyp install --fallback-to-build`,

Thus leading to fail the build and thus can't use webhints programmatically.,

Frameworks & versions.

Node 12.18.3, Electron 8.3.0

@molant
Copy link
Member

molant commented Sep 11, 2020

Hi @paragdiwan,

Sorry for the late response.
From the error it seems like you are running it directly inside electron. Is that right? Native modules need to be recompiled for Electron and unfortunately canvas is not an easy one to compile...

What is the scenario you are trying to achieve? canvas is used by the jsdom connector but you can probably use the puppeteer connector.

@paragdiwan
Copy link
Author

Hi @paragdiwan,

Sorry for the late response.
From the error it seems like you are running it directly inside electron. Is that right? Native modules need to be recompiled for Electron and unfortunately canvas is not an easy one to compile...

What is the scenario you are trying to achieve? canvas is used by the jsdom connector but you can probably use the puppeteer connector.

@molant
Yes you said right. I am trying to run webhints within the electron. irrespective of any connector, i.e. even before the execution step, the electron rebuilding process gives the error.

@molant
Copy link
Member

molant commented Sep 13, 2020

Do you have a repo we can clone with some steps to reproduce the error?
I'm not sure what do I have to do to see the same problem you do right now.

Thanks!

@hxlnt
Copy link
Member

hxlnt commented Oct 16, 2020

@paragdiwan, just following up to see if you have a sample repo you could share so we can try to repro your issue. Thanks!

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

3 participants