Cannot read property 'list' of undefined

I’ve just started having trouble fixing a non working Electron asset tracker. I’ve got about 8 of these devices up and running with my firmware successfully. Unfortunately I’ve only got access to the one device right now. I suspect the issue though is with the Particle CLI on my Macbook Pro. I Recently updated to Node v10.15.3 and NPM 6.9.0. I tried re-installing the CLI (as directed in some of the errors)

Some commands work fine e.g. particle list

The errors I get:

  • When trying to run Particle Doctor:
Please reinstall the CLI again using npm install -g particle-cli
The Doctor didn't complete sucesfully. Cannot read property 'list' of undefined
  • When I try to flash a device:
particle flash --serial electron_firmware_1554167697375.bin 
Please reinstall the CLI again using npm install -g particle-cli
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE 
Error writing firmware: Cannot read property 'list' of undefined

Didn’t find any help online. Any ideas?

What version CLI have you got (1.40.0?)
What version device OS have you got on your Electron?
If you may need to update the device OS run

particle update

in DFU Mode and then flash your application - in DFU Mode too - via

particle flash --usb electron_firmware_1554167697375.bin -v

Hey thanks Scruff.
Particle CLI version of 1.40.0
Device os 1.0.1

To confirm particle update works fine, as did flashing via DFU mode. So thanks for that, now I have a working device again.

The usual particle flash command via serial still has the same error as above.

That may be in connection with the way how the serial interface is found by CLI on Mac OS (which I don’t know anything about :blush:)

Are you still getting the message about reinstalling particle-cli?

Maybe try: npm rebuild -g particle-cli ?

Funnily enough I’ve tried that a good number of times!