Keytar 7.0.0 missing Node 12, 13, 14, and 15 prebuilds
cb1kenobi opened this issue · comments
Description
The following prebuilds are missing for all platforms:
• Node 12 - API Version 76
• Node 13 - API Version 79
• Node 14 - API Version 83
• Node 15 - API Version 88
This is a regression as keytar@6.0.1 has prebuilt binaries for API versions 72, 79, and 83.
Interestingly, there are prebuilds for Node API versions 68, 74, and 81, but there are no Node.js releases with API versions 68, 74, and 81! They don't exist!
If you attempt to install keytar@7.0.0
using Node 12 or newer, it won't find the prebuilt binary and proceed to compile it. This works fine on my macOS and Linux machines, but on Windows machines, users may not have Python or a C++ compiler.
Steps to Reproduce
- Use Node 12 (or newer)
- Install keytar@7.0.0
Expected behavior:
Expected the prebuilt binary to exist so that prebuilt-install can download it.
Actual behavior:
Prints out:
prebuild-install WARN install No prebuilt binaries found (target=14.15.0 runtime=node arch=x64 libc= platform=darwin)
Then blows up if you don't have Python or a C++ compiler.
Reproduces how often:
This is reproducible on all platforms.
Versions
Any platform. Any architecture. Node 12 or newer. keytar v7.
Additional Information
Seems this can be mitigated without publishing a new version by just building the missing targets and uploading them to GitHub.
Workaround
The only workaround is to downgrade to keytar@6.0.1.
I just got the same result. Will revert to keytar@6.0.1
Is someone able to test locally and see if this prebuilds any of the right versions are output that'd be a good start:
Line 37 in 346fdb7
Aside from adding v15 I'm not sure what else to do here to address this 🤔
I did a bunch of testing, wrote an epic comment detailing my findings, then deleted it. The problem isn't keytar
. Its node-abi
:
> require('node-abi').getAbi('12.19.0')
'68'
See electron/node-abi#90 and electron/node-abi#93. Someone was kind enough to submit a PR, but even the PR doesn't get things right. Given it's been over a month and no signs of movement on getting this fixed, it might be awhile. Sigh.
@cb1kenobi thanks for that writeup. If I can make time this week I'll have a go at publishing a @shiftkey/node-abi
package containing that fix which would at least unblock us here.
I've taken several attempts at working around the node-abi
issue but not found anything satisfactory:
- roll back to
2.18.0
ofnode-abi
means I can't publish prebuilds for Electron 10 - forking into
@shiftkey/node-abi
doesn't get picked up byprebuild
andprebuild-install
(so I'd need to at least forkprebuild-install
as it's a production dependency) - use
patch-package
to apply changes after installing latest version (makespatch-package
a production dependency for users to ensure it runs beforeprebuild-install
works)