Open ironsheep opened 1 month ago
@ironsheep , is this fixed? i am getting the same error
Same problem
I just discovered tonight that, after a bit of studying the node-gyp-build/node-gyp-buid.js
code that is throwing the not-found exception, I was able to determine that it is looking for the files in a couple of 'expected' locations.
So now this appears to be a packaging issue. The platform binaries are prebuilt. But the runtime loader (file mentioned above) needs to find them in one of the expected locations. I had to create a receiving directory that my extension includes in the package. I then had to copy the prebuilt .node files into this new location. I added a new entry in my package.json "scripts" section:
"makeprebuild": "mkdir -p ./client/prebuilds && cp -pr ./client/node_modules/@serialport/bindings-cpp/prebuilds/* ./client/prebuilds/"
... and then modified my prebuild script to run this new step by appending && npm run makeprebuild
:
"prebuild": "npm run compile && npm run compile:grammar && npm run makeprebuild",
My extension distributes both a ./client/out/extension.js
file and also a ./server/out/server.js' file. It now also distributes this new
./client/prebuilds/` folder as well.
I had to add:
!client/prebuilds/**/*
... to my .vscodeignore
file to get this new directory into my packaged extension.
Now this is all working for me!
Your solution may not be exactly the same since not everyone is distributing a ./server
component. But this should guide you in crafting your solution.
AUGH! This only solved part of my distribution problem in that win32-arm64/ is NOT one of the prebuilt platform binaries. I need win32-arm64/ to run Windows 11 in Parallels Desktop on a Mac Sudio M2 Ultra-based machine.
The following are there tho'
android-arm/
android-arm64/
darwin-x64+arm64/
linux-arm/
linux-arm64/
linux-x64/
win32-ia32/
win32-x64/
AUGH! Это решило только часть моей проблемы с дистрибуцией, поскольку win32-arm64/ НЕ является одним из готовых двоичных файлов платформы. Мне нужен win32-arm64/ для запуска Windows 11 в Parallels Desktop на машине Mac Sudio M2 Ultra.
Однако есть и следующее:
android-arm/ android-arm64/ darwin-x64+arm64/ linux-arm/ linux-arm64/ linux-x64/ win32-ia32/ win32-x64/
so u mean, this list of archs was builded?
Yes, these are all found in node_modules/@serialport/bindings-cpp/prebuilds
SerialPort Version
12.0.0
Node Version
18.18.2
Electron Version
28.2.8
Platform
platform=win32 arch=arm64 runtime=electron abi=119 uv=1 armv=8 libc=glibc
Architecture
Arm64 armv=8
Hardware or chipset of serialport
N/A
What steps will reproduce the bug?
I have SerialPort built into my VSCode extension. It runs well on many platforms. I have a Mac Studio - Apple M2 Ultra, 192GB running macOS Sonoma 14.5. I'm running Windows 11 in Parallels Desktop for Max (Pro Edition) v19.4.0
I install the spin2 extension into VSCode and I open a spin2 file. The extension crashes with the error shown in "What happens" below. It appears that one of the supporting binaries is not available for download:
No native build was found for platform=win32 arch=arm64 runtime=electron abi=119 uv=1 armv=8 libc=glibc node=18.18.2 electron=28.2.8
How can we get this native build added to the distribution?
This is one of my primary development platforms (I am using Windows 10, Linux raspiOS, macOS Sonoma, and Windows 11 in Parallels) for my development of this extension.
Here is the unreleased version of the extension that exhibits the crash... spin2-2.2.19.vsix.zip
What happens?
This is the crash output from the Spin2 Extension Host log
What should have happened?
It should locate the native build binary and continue to run as normal
Additional information
If you need anything else you can reach me at stephen@ironsheep.biz