-
Notifications
You must be signed in to change notification settings - Fork 31
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 from electron #30
Comments
It could be that Electron loads a DLL that The best way to know that is get Dependency Walker and point it at the Electron executable, then see if it or any of its dependencies are the same name as any of the ones in Hard for me to say much more than that as the error doesn't give us much detail and I don't have Windows anymore, but that's my best guess. |
From what I've been reading online, I think it might be due to the fact electron (v1.7.11) uses a specific version of node within (7.9), whereas I have 8.9.4 installed. Thanks! |
Oh, if you're right that isn't too hard, there's a |
I'll give that a go once I have the chance then! |
Hmm no luck with node 7.9 and npm 4.2:
Probably because that version of npm doesn't support the flag. Tried with node 8.9.4 and npm 5.4, and got the following error:
I think it has to do with the npm registry, meaning it can't find the package targeting 7.9? I can install it with no problems without the flag. |
Looks like you actually need a
|
That did it, but still no luck within electron 😢 Can we try this? (the manual rebuild for electron 1.7.11, specifically) I'll give it a try as well. |
Was able to use Edit: |
I'm also trying to run this from Electron without luck. I'm using the latest alpha (I need registerFont). This is the error: Uncaught Error: The module 'node_modules/canvas-prebuilt/canvas/build/Release/canvas.node' |
@chearon From my understanding, I'm basically rebuilding node-canvas with a specific electron version in mind, correct? Can you tell how to create a prebuilt version that I can publish and use as a dependency? For now I have been doing it locally, linking projects, but I would like to automate it if possible. Or does the new version allow me to set some flags in that regard? Thank you! |
any luck with this issue? I am still facing the issue. I use node v10 , electron 3 and canvas. I get the same DLL issue |
@Apidcloud I have also come across this issue. How did you do it locally by linking projects? I have also tried building it by using node-gyp and electron-rebuild with zero success? |
@das-solo I was able to do so by installing node-gyp and using it to rebuild the canvas module within canvas-prebuilt.
That is, open `node_modules/canvas-prebuilt/canvas` inside the project.
Then run `node-gyp rebuild` with some target and architecture flags (e.g., `—target=1.7.11 —arch=x64`)
Afterwards, just go to the project’s main folder and run npm or yarn link.
Finally, just go to the other project (that is using the first as a dependency) and run link again (e.g., `yarn link “first-project-package-name"`)
That was the only way I got it to work locally. But I still need to figure out a way of doing this automatically.
I haven’t been working on this for a while, but if anyone is able to come up with a way of, for instance, releasing a specific package while targeting a specific electron version (so other people that install your package don’t need to do the same thing), let me know.
|
Good evening!
I wonder if it's possible to use this package from within electron?
I'm using electron 1.7.11 and canvas-prebuilt 1.6.5-prerelease.1, but when I attempt to do so, the following error is raised:
The output yielded from windows.process.version is v7.9.0.
Any ideas on how to build this package targeting electron?
I've read something about electron-rebuild. Could it be used somehow?
Thanks!
The text was updated successfully, but these errors were encountered: