[SOLVED] CLI failing to run

Hi,
My partical-cli has stopped working, I've tried reinstalling and it looks like it installs but I can't run it from the command line.

This is what i get when I install (looks good to me)

[code]PS C:> npm install -g particle-cli

serialport@3.1.2 install C:\Users\Yendor\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\Yendor\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\serialport.node" is installed via remote
C:\Users\Yendor\AppData\Roaming\npm\particle -> C:\Users\Yendor\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.14.2 C:\Users\Yendor\AppData\Roaming\npm\node_modules\particle-cli
├── cli-spinner@0.2.5
├── xtend@4.0.1
├── semver@5.1.0
├── cli-table@0.3.1 (colors@1.0.3)
├── when@3.7.7
├── hogan.js@2.0.0
├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
├── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)
├── binary-version-reader@0.4.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.3, inflight@1.0.5, minimatch@2.0.10)
├── form-data@1.0.0-rc4 (async@1.5.2, combined-stream@1.0.5, mime-types@2.1.11)
├── inquirer@0.11.4 (strip-ansi@3.0.1, ansi-regex@2.0.0, ansi-escapes@1.4.0, through@2.3.8, rx-lite@3.1.2, cli-width@1.1.1, figures@1.7.0, run-async@0.1.0, cli-cursor@1.0.2, string-width@1.0.1, readline2@1.0.1)
├── node-wifiscanner2@1.2.0 (os-locale@1.4.0)
├── moment@2.13.0
├── latest-version@2.0.0 (package-json@2.3.2)
├── lodash@3.10.1
├── request@2.72.0 (tunnel-agent@0.4.3, aws-sign2@0.6.0, forever-agent@0.6.1, oauth-sign@0.8.2, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, aws4@1.4.1, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.2, node-uuid@1.4.7, qs@6.1.0, combined-stream@1.0.5, mime-types@2.1.11, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)
├── softap-setup@1.1.4 (node-rsa@0.2.30, nconf@0.7.2)
└── serialport@3.1.2 (bindings@1.2.1, commander@2.9.0, es6-promise@3.2.1, nan@2.3.5, debug@2.2.0, object.assign@4.0.3)[/code]But when I go to run it, I get an 'Command Not Found Exception'. [code]
PS C:> particle login
particle : The term 'particle' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • particle login
  •   + CategoryInfo          : ObjectNotFound: (particle:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException[/code] Does anyone know whats going on here??

Got it fixed by uninstall node then reinstalling node and particle-cli again.

I was thinking it was a ‘Environment Path’ issue but I didn’t know the right paths so for reference here are my current paths to do with node and particle:

PS C:\> $env:path -split ';' C:\Program Files\nodejs\ C:\Users\Yendor\AppData\Local\particle\bin C:\Particle\Tools\DFU-util C:\Users\Yendor\AppData\Roaming\npm