-
-
Notifications
You must be signed in to change notification settings - Fork 512
Electron 33 broken #978
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
Comments
This follows the fix for Electron v32: See: #973 (comment) |
Electron 33 ships with Node 20.18.0: |
Electron 33 moved to v8 13.0 while Node.js main is currently on v8 12.9, perhaps someone can create a working fork that addresses the problem? |
Great point @agracio ... pinging @toshiyuki-rs @oc-soft @kkoopa @bugsounet |
You should not ping |
Apologies, I thought you were the NAN maintainer :) 👍 (very quick response indeed, thank you) Well, my workaround is to comment (I do this with Closing the issue now. |
It is probably this commit. 0151569 I will get around to it at some future time. |
Thanks! |
@danielweck could you share your package.json script with postinstall |
And can someone with Electron 33 confirm that applying 0151569 resolves the issue? |
Will do but give me about 30+ minutes. |
Not pretty, quick and dirty, but works in MacOS and Linux:
|
It absolutely does, tested Electron 29, 30, 31, 32 and 33 that are supported by nan 2.22. |
@kkoopa So is it just a issue of merging that commit and everything will be working? |
synchronous-socket depends on nan, which needs to be patched for Electron >= 33. For the complete discussion and a hotfix see: nodejs/nan#978 (comment) Hopefully a PR that fixes it will be merged soon, nodejs/nan#979. Closes #56.
@danielweck this issue is still valid and should be open until a fix is landed |
The issue is not present in nan v2.22.2 tested with electron 29-34 as well as 35 beta and latest 36 nightly. |
Hi @danielweck EDIT: |
While the issue is solved in
const spawn = require('child_process').spawn
const existsSync = require('fs').existsSync
const nanPath = existsSync('./node_modules/nan/nan.h') ? './node_modules/nan/nan.h' : '../nan/nan.h'
if(existsSync(nanPath)){
if (process.platform === 'win32') {
spawn('powershell', ['-Command', `(Get-Content -Raw ${nanPath}) -replace '#include \"nan_scriptorigin.h\"', '// #include \"nan_scriptorigin.h\"' | Out-File -Encoding Utf8 ${nanPath}`], { stdio: 'inherit' })
} else {
spawn('sed', ['-i', '-e', 's/^#include .nan_scriptorigin\\.h./\\/\\/ #include nan_scriptorigin.h/', nanPath], { stdio: 'inherit' })
}
} |
Also just adding
|
I removed that script from my repo since the release of |
The latest NAN release works fine in Electron 32, but now fails with:
The text was updated successfully, but these errors were encountered: