-
• #2
Hi - I think this is due to the Node.js version - every few releases they change the API and it breaks old native plugins.
However you shouldn't actually need the library anyway. Are you trying to connect with Bluetooth or USB? Usually for those you use
noble
for BLE orserialport
for USB -
• #3
Okay, if i run the CLI with
--verbose
I get the following output:edit: I want to connect w/ bluetooth.
node node_modules\espruino\bin\espruino-cli.js --verbose 0.1.38 Espruino Command-line Tool 0.1.38 ----------------------------------- Acorn library not found - you'll need it for compiled code Found C:\Projekte\banglejs\test\node_modules\espruino/libs/targz.js Found C:\Projekte\banglejs\test\node_modules\espruino/libs/utf8.js Found C:\Projekte\banglejs\test\node_modules\espruino/espruino.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/codeWriter.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/config.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/env.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/flasher.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/flasherESP8266.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/modules.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/notifications.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_chrome_serial.js No chrome.serial - Chrome Serial disabled Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_chrome_socket.js No chrome.sockets - Chrome Socket disabled Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_frame.js serial_frame: Not running in a browser Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_noble.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_node_serial.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_node_socket.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_websocket_local.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_websocket_relay.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_web_audio.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_web_bluetooth.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_web_serial.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/serial_winnus.js 'winnus' module not found, no Windows Bluetooth Low Energy Error: Cannot find module 'winnus' Require stack: - C:\Projekte\banglejs\test\node_modules\espruino\index.js - C:\Projekte\banglejs\test\node_modules\espruino\bin\espruino-cli.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15) at Function.Module._load (node:internal/modules/cjs/loader:772:27) at Module.require (node:internal/modules/cjs/loader:999:19) at require (node:internal/modules/cjs/helpers:93:18) at eval (eval at loadJS (C:\Projekte\banglejs\test\node_modules\espruino\index.js:12:11), <anonymous>:10:14) at eval (eval at loadJS (C:\Projekte\banglejs\test\node_modules\espruino\index.js:12:11), <anonymous>:124:3) at loadJS (C:\Projekte\banglejs\test\node_modules\espruino\index.js:12:11) at loadDir (C:\Projekte\banglejs\test\node_modules\espruino\index.js:24:7) at Object.init (C:\Projekte\banglejs\test\node_modules\espruino\index.js:97:3) at Object.<anonymous> (C:\Projekte\banglejs\test\node_modules\espruino\bin\espruino-cli.js:844:24) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\\Projekte\\banglejs\\test\\node_modules\\espruino\\index.js', 'C:\\Projekte\\banglejs\\test\\node_modules\\espruino\\bin\\espruino-cli.js' ] } Found C:\Projekte\banglejs\test\node_modules\espruino/core/terminal.js Found C:\Projekte\banglejs\test\node_modules\espruino/core/utils.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/assembler.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/boardJSON.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/compiler.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/getGitHub.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/localModules.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/minify.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/pretokenise.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/saveOnSend.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/setTime.js Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/unicode.js UTF8 Library loaded successfully Found C:\Projekte\banglejs\test\node_modules\espruino/plugins/versionChecker.js Initialising CodeWriter Initialising Config Initialising Env Initialising Flasher Initialising FlasherESP8266 Initialising Modules Initialising Notifications Initialising Serial - Initialising Serial Noble Bluetooth LE - Initialising Serial Node Serial - Initialising Serial Node Socket - Initialising Serial Web Audio - Initialising Serial Web Bluetooth - Initialising Serial Web Serial Initialising Utils Initialising Status Initialising Assembler Initialising BoardJSON Initialising Compiler Initialising GetGitHub Initialising LocalModules Initialising Minify Initialising Pretokenise Initialising SaveOnSend Initialising SetTime Initialising Unicode Initialising VersionChecker Initialising CoreModules Searching for serial ports... Noble: getPorts - initialising... undefined:55 } else throw err; ^ Error: LIBUSB_ERROR_NOT_SUPPORTED at Device.usb.Device.open (C:\Projekte\banglejs\test\node_modules\usb\usb.js:38:7) at BluetoothHciSocket.bindUser (C:\Projekte\banglejs\test\node_modules\@abandonware\bluetooth-hci-socket\lib\usb.js:94:19) at BluetoothHciSocket.bindRaw (C:\Projekte\banglejs\test\node_modules\@abandonware\bluetooth-hci-socket\lib\usb.js:47:8) at Hci.init (C:\Projekte\banglejs\test\node_modules\@abandonware\noble\lib\hci-socket\hci.js:120:18) at NobleBindings.init (C:\Projekte\banglejs\test\node_modules\@abandonware\noble\lib\hci-socket\bindings.js:93:13) at C:\Projekte\banglejs\test\node_modules\@abandonware\noble\lib\noble.js:61:24 at processTicksAndRejections (node:internal/process/task_queues:78:11) { errno: -12 }
-
• #4
edit: Ahh, just spotted you said bluetooth!
-
• #5
Ok, so the issue is most likely that Noble isn't picking up your Bluetooth adaptor.
'Noble' has this video linked showing you what you need to do to set it up: https://www.youtube.com/watch?v=mL9B8wuEdms&t=106s
It's often a lot more sensible to add an external Bluetooth dongle which Noble can then pick up and use (rather than trying to use Zadig on your internal adaptor, which then stops normal Windows from using it)
Unfortunately Bluetooth LE with Node.js on Windows is a mess right now. It's one of the reasons I push everyone to the Web IDE - because it 'just works'.
-
• #6
I should add that there is this library: https://github.com/jasongin/noble-uwp
Which should be able to replace
noble
and 'just work' on Windows. You would have to install it and then change 'serial-noble.js` to make it work though. -
• #7
Okay, Zadig did the trick.
TY
Hi Everyone,
I am trying to get the EspruinoCLI to work, but dependency Winnus (https://github.com/espruino/winnus) is not building on Windows10.
I am getting a bunch of c++ errors: