-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Unable to target older node versions with node.js 17 #2534
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
Reaching way back but... #652 |
@EmingK Hi! I'm facing the exactly same problem as you. Are you found any solution for this? I'm updated to Monterey too and Node.js 17. |
This might be fixed by #2497 -- Node.js 17 no longer writes |
@cclauss I'm not sure why I was redirected here. I'm not using Node 17. So far I've tried with Node 14 and 16. If node-gyp issues related to electron-rebuild are out of scope, that's okay. |
You were directed here because you were commenting on an issue from 2015 and a lot has changed in the intervening six years. The error that you reported was |
I'm also seeing this error when targeting electron 11.2.3 from node 14.18.1, starting from Looking in Tested quickly and yeah looks like this was fixed with Electron v14.2.0 with electron/electron#31404 which links back to this feature #2497... so that sucks, need to upgrade Electron by a few major versions. |
upgrading |
I found the temporary solution here: marktext/marktext#2812 Specifically, revert to node@16:
|
Seme here. |
I found that upgrading to electron 13.6.9 also fixed the issue for me when I was trying to compile |
…om current i.e. building for node 16 on node 18 See nodejs/node-gyp#2534
…ns on newer node versions See nodejs/node-gyp#2534 and nodejs/node-gyp#2673 for more context on this issue
* Pass openssl_fips as a variable to support building older node versions on newer node versions See nodejs/node-gyp#2534 and nodejs/node-gyp#2673 for more context on this issue * Update dependencies * Add support for Node.js 18 and 19 As node-pre-gyp is no longer maintained this is the path of least resistance to adding new versions, we include a patch within this project that updates the abi_crosswalk file within node-pre-gyp that is used to map the versions of node to their module/v8 versions. Then in run.js we call patch-package before spawning anything to ensure that our patches are applied correctly. This isn't by any means perfect but it's the quickest way to update the supported versions of node without having to go and make any major refactors to the setup here, or the code in ioslib/the SDK
Configure/build a project targeting older node.js versions under node.js v17 with
node-gyp configure --target=<older node version>
fails.Verbose output (from npm or node-gyp):
It seems that node-gyp fetch config from the host node process (code). In node 17, the
openssl_fips
config item has been removed, causing corresponding config missing during gyp execution.Considering the target node may be built with different configurations (for instance, Electron builds), shouldn't the build config fetched from target node platform instead of host process...?
The text was updated successfully, but these errors were encountered: