Sorunome / arduino-upload

Atom Package for those who don't like the Arduino IDE
https://atom.io/packages/arduino-upload
MIT License
34 stars 7 forks source link

Uncaught TypeError: serialport.list is not a function #91

Open CarterSnich opened 2 years ago

CarterSnich commented 2 years ago

Description

Exception occurs when uploading. Verifying and Building works fine.

Versions

Atom: 1.60.0 x64 Electron: 9.4.4 OS: Microsoft Windows 10 Pro Thrown From: arduino-upload package 1.8.0

Stack Trace

Uncaught TypeError: serialport.list is not a function

At D:\Users\Joe Mar\.atom\packages\arduino-upload\lib\arduino-upload.coffee:271

TypeError: serialport.list is not a function
    at Object._getPort (/packages/arduino-upload/lib/arduino-upload.coffee:271:14)
    at /packages/arduino-upload/lib/arduino-upload.coffee:296:5)
    at /packages/arduino-upload/node_modules/usb-detection/index.js:48:15

Commands

     -3:40.2.0 arduino-upload:build (input.hidden-input)
     -3:40.2.0 window:save-all (atom-text-editor.editor.has-selection.is-focused)
     -3:30.1.0 arduino-upload:upload (input.hidden-input)
     -1:16 intentions:highlight (input.hidden-input)
     -1:15.6.0 command-palette:toggle (input.hidden-input)
     -1:14 editor:consolidate-selections (input.hidden-input)
     -1:14 core:cancel (input.hidden-input)
     -1:13.3.0 intentions:highlight (input.hidden-input)
     -1:13 command-palette:toggle (input.hidden-input)
     -1:09.8.0 core:move-down (input.hidden-input)
     -1:08.9.0 core:confirm (input.hidden-input)
     -1:08.9.0 settings-view:install-packages-and-themes (input.hidden-input)
     -0:15.3.0 command-palette:toggle (div.package-readme.native-key-bindings)
  3x -0:12.7.0 core:move-down (input.hidden-input)
     -0:10.4.0 core:confirm (input.hidden-input)
     -0:10.4.0 arduino-upload:serial-monitor (div.package-readme.native-key-bindings)

Non-Core Packages

arduino-upload 1.8.0 
atom-beautify 0.33.4 
atom-ice-syntax 1.0.2 
atom-ice-ui 1.0.0 
atom-pronama-chan 1.1.1 
busy-signal 2.0.1 
editor-background 1.2.42 
flex-tool-bar 2.2.7 
intentions 2.1.1 
language-arduino 0.4.3 
language-ino 0.2.0 
linter 3.4.0 
linter-gcc 0.9.0 
linter-ui-default 3.4.1 
outrun-syntax 0.2.2 
synthwave-syntax 0.3.0 
tool-bar 1.4.4 
TheBiotechScientist commented 1 year ago

I have the same problem. I have tried installing an old versión of Atom, an old version of Node.js, and also I have tried installing the new versions of both and some combinations of old and new versions too, but I never got succed.

This problem became after updating Atom.

I have read the Node documentation about the serialport package from serialport.io and it seems to be well implemented in the arduino-upload\lib\arduino-upload.coffee file at line 271, even so, it doesn´t works. Maybe, it could be an object issue, because of the at Object._getPort related line.

Also I've tried using that serialport package from command line and it works fine, but if I try to installing it again I get some errors due to version incompatibility. So, I'm little confused.

I hope someone can resolve this issue or explain what one can do to solve it.

Thanks!