Particle CLI can't flash OTA with new update


I just did an update for the particle CLI and now I get this error when I try to flash OTA:

		return api.flashDevice(deviceid, files);
TypeError: undefined is not a function
    at Object.extend.flashDevice (/usr/local/lib/node_modules/particle-cli/commands/CloudCommands.js:229:14)
    at Object.extend.flashCloud (/usr/local/lib/node_modules/particle-cli/commands/FlashCommand.js:128:28)
    at Object.extend.flashSwitch (/usr/local/lib/node_modules/particle-cli/commands/FlashCommand.js:120:29)
    at Object.BaseCommand.runCommand (/usr/local/lib/node_modules/particle-cli/commands/BaseCommand.js:110:17)
    at Object.Interpreter.runCommand (/usr/local/lib/node_modules/particle-cli/lib/interpreter.js:98:13)
    at Object.Interpreter.handle (/usr/local/lib/node_modules/particle-cli/lib/interpreter.js:56:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/particle-cli/bin/particle.js:20:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

Flashing still works with DFU mode using “particle flash --usb,” but it’s a lot more convenient to do it OTA (device is in a bigger console unit). How to fix?


Try reinstalling your particle-cli again :slight_smile:

Tried reinstalling, “sudo npm uninstall -g particle-cli” and then reinstalling with “npm install -g particle-cli” – still get the same error with OTA flashing

I’m not sure what happened but the fix is already in but version not bumped yet -

Did you use the command particle flash device_name xxxxx?

Yep! particle flash --usb xxxxxx works but device_name doesn’t

For now you can install using npm install -g particle-cli@1.5.11 until the fix is in :slight_smile:


Yea, that version works, thanks! When should I expect the fix to be updated?

probably next few hours (hopefully) :slight_smile:


@LeoW, you can perform a npm update -g particle-cli to pull the updated CLI :wink:

1 Like