CLI going crazy again


#1

Hi,

I seem to be having trouble with the particle-cli again.

I’ve had head banging sessions in the past but for the last year or so its been fine. I have it installed on my windows 7 laptop, and after my last problems I discovered that I had multiple over installations which appead to be the casse of my problems. So I uninstalled it both using the installer and the command line prompt. Installed it via the windows installer and everything seem stable.

Then a few weeks ago, I was using the command line to set up a core, which it had been succesfull at doing when I was prompted that a new version of the cli was available and to update it with npm -g particle-cli upgrade, for something very similar, OK I thought and gave it a go. Which was a mistake becasue then, when ever I ran it it would complain that it needed node 4.4. So I upgraded node to 8 (something) and then the CLI just started messing me around all over again. So I uninstalled the CLI, with the installer, only to find particle still present on the command line, did a command line uninstall and once I thought I had rid of it, reinstalled it with the installer. Everything seemed to go fine, I could run particle without a prompt to undate.

But now I am trying to set up a 1st gen core.

I can use particle setup, to set up the wifi, and strangely it is not asking for the security type, just the SSID and password. It can been seen on the console devices screen going on and offline. its breathing blue, it reacts to the rainbow command. I can not flash to it.

I have tried using particle doctor, but it fails after updating cc3000 firmware, applying update, then doctor didn’t complete sucesfully. this.promptDfd is not a function.

my current particle version is 1.28.2 and Node version 8,10.0

any suggestions?

Liam


#2

Despite the instructions to the contrary, you should never update the Windows Particle CLI installed with the Particle CLI installer using npm install -g particle-cli (or npm update). The Windows CLI will update itself when needed now.

To get out of this, uninstall the manual install again:

npm uninstall -g particle-cli

Then try reinstalling the CLI using the Windows CLI Installer again.


#3

Manually updating CLI previously installed via Windows Installer would be done via particle update-cli


#4

Hi,

Well I’ve managed to get my core functioning again, by running partical doctor at home on my desk top, another windows 7 machine.

This machine is running CLI version 1.27 and node 4.2.2. When I checked which version of cli it is running it did prompt me:-

C:\Users\Cyber>particle --version
particle-cli v1.27.0

! A newer version (1.28.2) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

1.27.0

C:\Users\Cyber>particle setup

So clearly I’m not going to update my desktop, unitl I can figure out why my laptop got all hissy-fitty with trying to upgrade the cli. All I did was run the suggested command line npm install -g particle-cli, and then it got nasty about the node version I was using, demanding node 4.4. after finally upgrading node to version 8 it started going wrong, forcing me in to uninstalling the cli both via the program manager, and becasue it was still there, the command line uninstall.

Thinking I was all clear I reinstalled via the program manager and now its really not playing ball. When I do get the core online via the laptop, it keeps goiong on and offline every 20 second or so.

As I have managed to get it working using an older install of my desktop surely it must be something in the laptop installation. And clearly casued by something uninstalling both the command line way and the program manager way failed to resolve.

Still scratching my head but I’ll try again tomorrow at work.

Liam


#5

Do not follow the npm install instructions listed there, as they’re wrong and will lead to the problem you described. Instead, do:

particle update-cli

#6

Hi, Hopefully someone will pick up on this old thread, but I’ve just had some time to return to the problem.

OK, my main problem started when I got a message on my cli advising me to update it with using the :- npm install -g particle-cli command.

Well like a good chap I did and it turns out I was wrong and should have used ‘particle update-cli’

Will I have tried it, and I get a report back that there is nothing to update. But I am still having problems when I run the particle doctor command is get:-

Flash success!
Applying update…
Wait until the device stops blinking magenta and starts blinking yellow
The Doctor didn’t complete sucesfully. this.promptDfd is not a function
Please visit our community forums for help with this error:

And my device is stuck flashing yellowy/green,

I’m able to recover my device using particle doctor on an other machine so I’m not tearing my hair out but I would like to get my laptop working again.

Basically its a win 7 machine. I have tried uninstalling it and reinstalling it using the windows installer.

Using

npm ls

Shows there is no other npm packages installed

I get

C:\Users\Liam>particle --version
1.29.0

And attempts to repair the install using

C:\Users\Liam>particle update-cli
Updating CLI… no plugins to update.

So I am at a loss now. I thought I have learnt uninstalling and reinstalling particle CLI to a tee now, but its got me beat.

Any idea what is causing the

this.promptDfd is not a function

So I can try and find a solution? Any help appreciated.

Thanks

Liam


#7

I think you’re still picking up the wrong CLI install. Do a file search for particle. The correct installation location after using the Particle CLI installer is of the form:

C:\Users\username\AppData\Local\particle

If you’re finding one in a node directory, then the wrong one is being used.


#8

Hi,

I’ve had as best a look as I can, but as an Old Dos-fuddy-wuddy, I find the search functions on windows 7 a bit lumpy.

But at the command line I can only find one instance of particle.exe anywhere on my system.

And for good measure I searched for node as well, the result are below.

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\Liam>where node
C:\Program Files\nodejs\node.exe

C:\Users\Liam>where particle
C:\Users\Liam\AppData\Local\particle\bin\particle.exe

I think I am going to have to uninstall the CLI yet again and uninstall node as well. Any thing else anyone can suggest I should do my best to uninstall as well?

Thanks

Liam