Closed g8up closed 3 years ago
can you try espruino --list
to see if the serial ports are detected first? That should work, but you could try without quotes just in case?
npx espruino --list
Espruino Command-line Tool 0.1.38
-----------------------------------
Error: No Ports Found
- but I can connect in Web IDE (chrome app)
![image](https://user-images.githubusercontent.com/8005686/114418195-d991ec80-9be4-11eb-88e3-1120c074af38.png)
Ok, thanks! What about espruino --list --verbose
?
That might give you some idea what's going on. My guess is the serialport
Node.js module hasn't installed correctly for some reason.
inactive
I am having the same problem... Windows 10. I installed npm install -g espruino
, I doing espruino --list
I get this error.
Espruino Command-line Tool 0.1.40
-----------------------------------
Error: No Ports Found
This is the fiull stack:
0.1.40
Espruino Command-line Tool 0.1.40
-----------------------------------
Acorn library not found - you'll need it for compiled code
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/libs/targz.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/libs/utf8.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/libs/esprima/escodegen.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/libs/esprima/esmangle.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/libs/esprima/esprima.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/espruino.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/codeWriter.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/config.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/env.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/flasher.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/flasherESP8266.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/modules.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/notifications.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_chrome_serial.js
No chrome.serial - Chrome Serial disabled
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_chrome_socket.js
No chrome.sockets - Chrome Socket disabled
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_frame.js
serial_frame: Not running in a browser
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_noble.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_node_serial.js
No 'serialport' module found
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_node_socket.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_websocket_local.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_websocket_relay.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_web_audio.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_web_bluetooth.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_web_serial.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/serial_winnus.js
'winnus' module not found, no Windows Bluetooth Low Energy Error: Cannot find module 'winnus'
Require stack:
- C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js
- C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\bin\espruino-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at eval (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:10:14)
at eval (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:124:3)
at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11)
at loadDir (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:24:7)
at Object.init (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:80:3)
at Object.<anonymous> (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\bin\espruino-cli.js:847:24) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Andres\\AppData\\Roaming\\npm\\node_modules\\espruino\\index.js',
'C:\\Users\\Andres\\AppData\\Roaming\\npm\\node_modules\\espruino\\bin\\espruino-cli.js'
]
}
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/terminal.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/core/utils.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/assembler.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/boardJSON.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/compiler.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/getGitHub.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/localModules.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/minify.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/pretokenise.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/saveOnSend.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/setTime.js
Found C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino/plugins/unicode.js
UTF8 Library loaded successfully
Found C:\Users\Andres\AppData\Roaming\npm\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 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 Unicode
Initialising VersionChecker
Initialising CoreModules
Initialising Pretokenise
Initialising SaveOnSend
Initialising SetTime
Searching for serial ports...
Noble: getPorts - initialising...
Noble: module couldn't be loaded, no node.js Bluetooth Low Energy
Error: Cannot find module '@abandonware/noble'
Require stack:
- C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js
- C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\bin\espruino-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at startNoble (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:64:17)
at Object.getPorts (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:145:14)
at eval (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:109:14)
at Array.forEach (<anonymous>)
at Object.getPorts (eval at loadJS (C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\index.js:12:11), <anonymous>:107:13)
at C:\Users\Andres\AppData\Roaming\npm\node_modules\espruino\bin\espruino-cli.js:805:28 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Andres\\AppData\\Roaming\\npm\\node_modules\\espruino\\index.js',
'C:\\Users\\Andres\\AppData\\Roaming\\npm\\node_modules\\espruino\\bin\\espruino-cli.js'
]
}
Error: No Ports Found
BTW, I am trying to connect to an ESP32 board
@gfwilliams You might want to reopen the issue. It is still a bug, and it is happening for me too. The error is the same as @js4iot posted above.
Do you have exactly the same log when you run with --verbose
? And what operating system and Node.js version are you on?
It looks from the code above like serialport
was never installed. If you do npm install serialport
what errors do you get on the console?
@gfwilliams Do you want me to do this on a clone of this repository? I can do some more tests if it helps. Yes, the output was exactly the same when I ran it. I had installed the latest NPM version globally on Windows 10. Should I do npm i serialport
inside the directory where espruino
is installed (globally), or should I clone the repository and do an npm link
instead?
You could just try in the directory where Espruino is installed, but I guess if you can clone the repo we might stand a chance of changing something to get it working.
My feeling right now is maybe in ba139d15d5b30c735032cefae4146d3b03f4596d I started using serialport 10, but that's not compatible with your Node.js version?
Also, what operating system and Node.js version are you on?
Good point. I guess I'll clone the repository and start testing, because that leaves a better chance to get this to work.
I'm on Windows 10 and the Node version I used for this was v15.6.0.
as my usb connects at
COM10
, according to the Web IDE echoConnected to \\.\COM10
;How to spell the cli command args
port
?