vscode-circuitpython: [BUG] Missing `node-v80-darwin-x64/bindings.node` & work-around
OS: MacOS 10.15.6
Added via Visual Studio Code Extension Manager.
Tried to run any CircuitPython commands gave:
Activating extension 'joedevivo.vscode-circuitpython' failed: Could not locate the bindings file. Tried:
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/build/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/build/Debug/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/build/Release/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/out/Debug/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/Debug/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/out/Release/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/Release/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/build/default/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/compiled/12.14.1/darwin/x64/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
→ /Users/julian/.vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/lib/binding/node-v80-darwin-x64/bindings.node.
_logMessageInConsole @ abstractExtensionService.ts:396
_logOrShowMessage @ abstractExtensionService.ts:396
$onExtensionActivationError @ host.ts:10
_doInvokeHandler @ rpcProtocol.ts:372
_invokeHandler @ rpcProtocol.ts:372
_receiveRequest @ rpcProtocol.ts:253
_receiveOneMessage @ rpcProtocol.ts:185
(anonymous) @ rpcProtocol.ts:51
fire @ event.ts:584
fire @ ipc.net.ts:459
_receiveMessage @ ipc.net.ts:792
(anonymous) @ ipc.net.ts:647
fire @ event.ts:584
acceptChunk @ ipc.net.ts:216
(anonymous) @ ipc.net.ts:137
t @ ipc.net.ts:859
emit @ events.js:223
addChunk @ _stream_readable.js:309
readableAddChunk @ _stream_readable.js:290
Readable.push @ _stream_readable.js:224
onStreamRead @ internal/stream_base_commons.js:181
Workaround:
create .vscode/extensions/joedevivo.vscode-circuitpython-0.1.2/node_modules/@serialport/bindings/lib/binding/node-v80-darwin-x64
download https://github.com/serialport/node-serialport/releases/download/%40serialport%2Fbindings%409.0.1/bindings-v9.0.1-electron-v80-darwin-x64.tar.gz
move the bindings.node from the downloaded file to node-v80-darwin-x64/
Disable & re-enable. Seems to be getting further.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
@joedevivo you can use the node-usb-native package, this what we use in the Arduino extension for vscode.
@julianrendell Could you try out the 0.1.3 release? If that works for you I’ll close this.
@julianrendell I’ve got it all wired up, try installing this package
This is a problem that’s plagued me since the beginning. The native bindings for
serialportchange every time vscode upgrades their version of electron.Your workaround is what I’ve been doing during the packaging of the extension, but it won’t work with
drivelist, which is going to be useful for some upcoming features, but they don’t publish prebuilds likeserialport.I’m hoping to get this all building in azure pipelines soon, which should allow me to prebuild bindings for Windows, macOS, and Linux, and include them in the published build.
The automation will hopefully be able to trigger on new versions of CircuitPython and new boards as well.