Thanks for that tip, unfortunately I'm having some trouble installing the CLI b/c I can't install winnus. Log output below, any ideas?
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\tony> npm install -g espruino
npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
C:\Users\tony\AppData\Roaming\npm\espruino -> C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\bin\espruino-cli.js
> usb@1.7.1 install C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\usb
> prebuild-install --runtime napi --target 4 --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ C:\Users\tony\AppData\Roaming\npm-cache\_prebuilds\96eb89-usb-v1.7.1-napi-v4-win32-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ C:\Users\tony\AppData\Roaming\npm-cache\_prebuilds\96eb89-usb-v1.7.1-napi-v4-win32-x64.tar.gz
prebuild-install info unpack resolved to C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\usb\build\Release\usb_bindings.node
prebuild-install info install Successfully installed prebuilt binary!
> @abandonware/bluetooth-hci-socket@0.5.3-7 install C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-7/bluetooth_hci_socket-0.5.3-7-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/bluetooth-hci-socket@0.5.3-7 and node@12.18.3 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
win_delay_load_hook.cc
bluetooth_hci_socket.vcxproj -> C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\blu
etooth-hci-socket\build\Release\\bluetooth_hci_socket.node
Copying C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\bluetooth-hci-socket\build\
Release\/bluetooth_hci_socket.node to C:/Users/tony/AppData/Roaming/npm/node_modules/espruino/node_modules/@abandonwa
re/bluetooth-hci-socket/lib/binding\bluetooth_hci_socket.node
1 file(s) copied.
> @abandonware/noble@1.9.2-14 install C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble
> node-gyp rebuild
C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
win_delay_load_hook.cc
noble.vcxproj -> C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble\build\Releas
e\\noble.node
> winnus@0.0.6 install C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus
> node-gyp rebuild
C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
winnus.cpp
win_delay_load_hook.cc
C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus\cpp\winnus.cpp(39,11): error C2039: 'Handle
': is not a member of 'v8' [C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus\build\winnus.vc
xproj]
C:\Users\tony\AppData\Local\node-gyp\Cache\12.18.3\include\node\v8-platform.h(16): message : see declaration of 'v8' [C
:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus\build\winnus.vcxproj]
...
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\winnus
gyp ERR! node -v v12.18.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: winnus@0.0.6 (node_modules\espruino\node_modules\winnus):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: winnus@0.0.6 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ espruino@0.1.38
added 28 packages from 102 contributors and updated 1 package in 26.988s
PS C:\Users\tony> espruino -d Puck.js
Espruino Command-line Tool 0.1.38
-----------------------------------
Searching for device named "Puck.js"
undefined:55
} else throw err;
^
Error: No compatible USB Bluetooth 4.0 device found!
at BluetoothHciSocket.bindUser (C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\bluetooth-hci-socket\lib\usb.js:91:11)
at BluetoothHciSocket.bindRaw (C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\bluetooth-hci-socket\lib\usb.js:47:8)
at Hci.init (C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble\lib\hci-socket\hci.js:120:18)
at NobleBindings.init (C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble\lib\hci-socket\bindings.js:93:13)
at C:\Users\tony\AppData\Roaming\npm\node_modules\espruino\node_modules\@abandonware\noble\lib\noble.js:61:24
at processTicksAndRejections (internal/process/task_queues.js:79:11)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for that tip, unfortunately I'm having some trouble installing the CLI b/c I can't install winnus. Log output below, any ideas?