After instalation particle still not working MAC

After runnung sudo npm install -g particle-cli and succesfuly instaling it I used CoolTerm to connect my year old Spark Core to wifi. Good its flashing cyan, but running comand it finds no such particle comand

particle cloud login
-bash: particle: command not found

I have no idea why this ir not working - i just cannot claim my spark core

after installing particle terminal logs:

/usr/local/Cellar/node/5.4.0/libexec/npm/bin/particle -> /usr/local/Cellar/node/5.4.0/libexec/npm/lib/node_modules/particle-cli/bin/particle.js

> serialport@2.0.6 install /usr/local/Cellar/node/5.4.0/libexec/npm/lib/node_modules/particle-cli/node_modules/serialport
> node-pre-gyp install --fallback-to-build

    [serialport] Success: "/usr/local/Cellar/node/5.4.0/libexec/npm/lib/node_modules/particle-cli/node_modules/serialport/build/Release/node-v46-darwin-x64/serialport.node" is installed via remote
    /usr/local/Cellar/node/5.4.0/libexec/npm/lib
    └─┬ particle-cli@1.8.22 
      ├─┬ chalk@1.1.1 
      │ ├── ansi-styles@2.1.0 
      │ ├── escape-string-regexp@1.0.4 
      │ ├─┬ has-ansi@2.0.0 
      │ │ └── ansi-regex@2.0.0 
      │ ├── strip-ansi@3.0.0 
      │ └── supports-color@2.0.0 
      ├── cli-spinner@0.2.1 
      ├─┬ cli-table@0.3.1 
      │ └── colors@1.0.3 
      ├── fast-luhn@1.0.2 
      ├─┬ glob@4.5.3 
      │ ├─┬ inflight@1.0.4 
      │ │ └── wrappy@1.0.1 
      │ ├── inherits@2.0.1 
      │ ├─┬ minimatch@2.0.10 
      │ │ └─┬ brace-expansion@1.1.2 
      │ │   ├── balanced-match@0.3.0 
      │ │   └── concat-map@0.0.1 
      │ └── once@1.3.3 
      ├── hogan.js@2.0.0 
      ├─┬ inquirer@0.8.5 
      │ ├── ansi-regex@1.1.1 
      │ ├── cli-width@1.1.0 
      │ ├── figures@1.4.0 
      │ ├─┬ readline2@0.1.1 
      │ │ ├── mute-stream@0.0.4 
      │ │ └─┬ strip-ansi@2.0.1 
      │ │   └── ansi-regex@1.1.1 
      │ ├── rx@2.5.3 
      │ └── through@2.3.8 
      ├── lodash@3.10.1 
      ├── moment@2.11.0 
      ├─┬ node-wifiscanner2@1.1.0 
      │ └─┬ os-locale@1.4.0 
      │   └─┬ lcid@1.0.0 
      │     └── invert-kv@1.0.0 
      ├─┬ request@2.67.0 
      │ ├── aws-sign2@0.6.0 
      │ ├─┬ bl@1.0.0 
      │ │ └─┬ readable-stream@2.0.5 
      │ │   ├── core-util-is@1.0.2 
      │ │   ├── isarray@0.0.1 
      │ │   ├── process-nextick-args@1.0.6 
      │ │   ├── string_decoder@0.10.31 
      │ │   └── util-deprecate@1.0.2 
      │ ├── caseless@0.11.0 
      │ ├─┬ combined-stream@1.0.5 
      │ │ └── delayed-stream@1.0.0 
      │ ├── extend@3.0.0 
      │ ├── forever-agent@0.6.1 
      │ ├─┬ form-data@1.0.0-rc3 
      │ │ └── async@1.5.2 
      │ ├─┬ har-validator@2.0.3 
      │ │ ├─┬ commander@2.9.0 
      │ │ │ └── graceful-readlink@1.0.1 
      │ │ ├─┬ is-my-json-valid@2.12.3 
      │ │ │ ├── generate-function@2.0.0 
      │ │ │ ├─┬ generate-object-property@1.2.0 
      │ │ │ │ └── is-property@1.0.2 
      │ │ │ └── jsonpointer@2.0.0 
      │ │ └─┬ pinkie-promise@2.0.0 
      │ │   └── pinkie@2.0.1 
      │ ├─┬ hawk@3.1.2 
      │ │ ├── boom@2.10.1 
      │ │ ├── cryptiles@2.0.5 
      │ │ ├── hoek@2.16.3 
      │ │ └── sntp@1.0.9 
      │ ├─┬ http-signature@1.1.0 
      │ │ ├── assert-plus@0.1.5 
      │ │ ├─┬ jsprim@1.2.2 
      │ │ │ ├── extsprintf@1.0.2 
      │ │ │ ├── json-schema@0.2.2 
      │ │ │ └── verror@1.3.6 
      │ │ └─┬ sshpk@1.7.2 
      │ │   ├── assert-plus@0.2.0 
      │ │   ├── dashdash@1.12.0 
      │ │   ├── ecc-jsbn@0.1.1 
      │ │   ├── jodid25519@1.0.2 
      │ │   ├── jsbn@0.1.0 
      │ │   └── tweetnacl@0.13.3 
      │ ├── is-typedarray@1.0.0 
      │ ├── isstream@0.1.2 
      │ ├── json-stringify-safe@5.0.1 
      │ ├─┬ mime-types@2.1.9 
      │ │ └── mime-db@1.21.0 
      │ ├── node-uuid@1.4.7 
      │ ├── oauth-sign@0.8.0 
      │ ├── qs@5.2.0 
      │ ├── stringstream@0.0.5 
      │ ├── tough-cookie@2.2.1 
      │ └── tunnel-agent@0.4.2 
      ├─┬ serialport@2.0.6 
      │ ├── async@0.9.0 
      │ ├── bindings@1.2.1 
      │ ├─┬ debug@2.2.0 
      │ │ └── ms@0.7.1 
      │ ├── nan@2.0.9 
      │ ├─┬ node-pre-gyp@0.6.18
      │ │ ├─┬ npmlog@2.0.0
      │ │ │ └─┬ are-we-there-yet@1.0.5
      │ │ │   └─┬ readable-stream@2.0.5 
      │ │ │     ├── core-util-is@1.0.2 
      │ │ │     ├── inherits@2.0.1 
      │ │ │     ├── isarray@0.0.1 
      │ │ │     ├── process-nextick-args@1.0.6 
      │ │ │     ├── string_decoder@0.10.31 
      │ │ │     └── util-deprecate@1.0.2 
      │ │ ├─┬ rc@1.1.5
      │ │ │ └── ini@1.3.4 
      │ │ ├─┬ request@2.67.0 
      │ │ │ ├── aws-sign2@0.6.0 
      │ │ │ ├─┬ bl@1.0.0 
      │ │ │ │ └─┬ readable-stream@2.0.5 
      │ │ │ │   ├── core-util-is@1.0.2 
      │ │ │ │   ├── inherits@2.0.1 
      │ │ │ │   ├── isarray@0.0.1 
      │ │ │ │   ├── process-nextick-args@1.0.6 
      │ │ │ │   ├── string_decoder@0.10.31 
      │ │ │ │   └── util-deprecate@1.0.2 
      │ │ │ ├── caseless@0.11.0 
      │ │ │ ├─┬ combined-stream@1.0.5 
      │ │ │ │ └── delayed-stream@1.0.0 
      │ │ │ ├── extend@3.0.0 
      │ │ │ ├── forever-agent@0.6.1 
      │ │ │ ├── form-data@1.0.0-rc3 
      │ │ │ ├─┬ har-validator@2.0.3 
      │ │ │ │ ├─┬ chalk@1.1.1 
      │ │ │ │ │ ├── ansi-styles@2.1.0 
      │ │ │ │ │ ├─┬ has-ansi@2.0.0 
      │ │ │ │ │ │ └── ansi-regex@2.0.0 
      │ │ │ │ │ ├─┬ strip-ansi@3.0.0 
      │ │ │ │ │ │ └── ansi-regex@2.0.0 
      │ │ │ │ │ └── supports-color@2.0.0 
      │ │ │ │ ├─┬ commander@2.9.0 
      │ │ │ │ │ └── graceful-readlink@1.0.1 
      │ │ │ │ ├─┬ is-my-json-valid@2.12.3 
      │ │ │ │ │ ├── generate-function@2.0.0 
      │ │ │ │ │ ├─┬ generate-object-property@1.2.0 
      │ │ │ │ │ │ └── is-property@1.0.2 
      │ │ │ │ │ ├── jsonpointer@2.0.0 
      │ │ │ │ │ └── xtend@4.0.1 
      │ │ │ │ └─┬ pinkie-promise@2.0.0 
      │ │ │ │   └── pinkie@2.0.1 
      │ │ │ ├─┬ hawk@3.1.2 
      │ │ │ │ ├── boom@2.10.1 
      │ │ │ │ ├── cryptiles@2.0.5 
      │ │ │ │ ├── hoek@2.16.3 
      │ │ │ │ └── sntp@1.0.9 
      │ │ │ ├─┬ http-signature@1.1.0 
      │ │ │ │ ├── assert-plus@0.1.5 
      │ │ │ │ ├─┬ jsprim@1.2.2 
      │ │ │ │ │ ├── extsprintf@1.0.2 
      │ │ │ │ │ ├── json-schema@0.2.2 
      │ │ │ │ │ └── verror@1.3.6 
      │ │ │ │ └─┬ sshpk@1.7.1
      │ │ │ │   ├── asn1@0.2.3 
      │ │ │ │   ├── assert-plus@0.2.0 
      │ │ │ │   ├─┬ dashdash@1.10.1
      │ │ │ │   │ └── assert-plus@0.1.5 
      │ │ │ │   ├── ecc-jsbn@0.1.1 
      │ │ │ │   ├── jodid25519@1.0.2 
      │ │ │ │   └── jsbn@0.1.0 
      │ │ │ ├── is-typedarray@1.0.0 
      │ │ │ ├── isstream@0.1.2 
      │ │ │ ├── json-stringify-safe@5.0.1 
      │ │ │ ├── node-uuid@1.4.7 
      │ │ │ ├── oauth-sign@0.8.0 
      │ │ │ ├── qs@5.2.0 
      │ │ │ ├── stringstream@0.0.5 
      │ │ │ ├── tough-cookie@2.2.1 
      │ │ │ └── tunnel-agent@0.4.2 
      │ │ ├─┬ rimraf@2.4.4
      │ │ │ └─┬ glob@5.0.15
      │ │ │   ├─┬ inflight@1.0.4 
      │ │ │   │ └── wrappy@1.0.1 
      │ │ │   ├── inherits@2.0.1 
      │ │ │   ├─┬ minimatch@3.0.0
      │ │ │   │ └─┬ brace-expansion@1.1.2 
      │ │ │   │   ├── balanced-match@0.3.0 
      │ │ │   │   └── concat-map@0.0.1 
      │ │ │   └─┬ once@1.3.3 
      │ │ │     └── wrappy@1.0.1 
      │ │ ├─┬ tar@2.2.1
      │ │ │ └── inherits@2.0.1 
      │ │ └─┬ tar-pack@3.1.2
      │ │   ├─┬ fstream@1.0.8
      │ │   │ └── inherits@2.0.1 
      │ │   ├─┬ fstream-ignore@1.0.3
      │ │   │ ├── inherits@2.0.1 
      │ │   │ └─┬ minimatch@3.0.0
      │ │   │   └─┬ brace-expansion@1.1.2 
      │ │   │     ├── balanced-match@0.3.0 
      │ │   │     └── concat-map@0.0.1 
      │ │   └─┬ readable-stream@2.0.5 
      │ │     ├── core-util-is@1.0.2 
      │ │     ├── inherits@2.0.1 
      │ │     ├── isarray@0.0.1 
      │ │     ├── process-nextick-args@1.0.6 
      │ │     ├── string_decoder@0.10.31 
      │ │     └── util-deprecate@1.0.2 
      │ ├─┬ node-pre-gyp-github@1.1.1
      │ │ ├─┬ commander@2.9.0 
      │ │ │ └── graceful-readlink@1.0.1 
      │ │ └─┬ request@2.67.0 
      │ │   ├── aws-sign2@0.6.0 
      │ │   ├─┬ bl@1.0.0 
      │ │   │ └─┬ readable-stream@2.0.5 
      │ │   │   ├── core-util-is@1.0.2 
      │ │   │   ├── inherits@2.0.1 
      │ │   │   ├── isarray@0.0.1 
      │ │   │   ├── process-nextick-args@1.0.6 
      │ │   │   ├── string_decoder@0.10.31 
      │ │   │   └── util-deprecate@1.0.2 
      │ │   ├── caseless@0.11.0 
      │ │   ├─┬ combined-stream@1.0.5 
      │ │   │ └── delayed-stream@1.0.0 
      │ │   ├── extend@3.0.0 
      │ │   ├── forever-agent@0.6.1 
      │ │   ├── form-data@1.0.0-rc3 
      │ │   ├─┬ har-validator@2.0.3 
      │ │   │ ├─┬ chalk@1.1.1 
      │ │   │ │ ├── ansi-styles@2.1.0 
      │ │   │ │ ├── escape-string-regexp@1.0.4 
      │ │   │ │ ├─┬ has-ansi@2.0.0 
      │ │   │ │ │ └── ansi-regex@2.0.0 
      │ │   │ │ ├─┬ strip-ansi@3.0.0 
      │ │   │ │ │ └── ansi-regex@2.0.0 
      │ │   │ │ └── supports-color@2.0.0 
      │ │   │ ├─┬ is-my-json-valid@2.12.3 
      │ │   │ │ ├── generate-function@2.0.0 
      │ │   │ │ ├─┬ generate-object-property@1.2.0 
      │ │   │ │ │ └── is-property@1.0.2 
      │ │   │ │ ├── jsonpointer@2.0.0 
      │ │   │ │ └── xtend@4.0.1 
      │ │   │ └─┬ pinkie-promise@2.0.0 
      │ │   │   └── pinkie@2.0.1 
      │ │   ├─┬ hawk@3.1.2 
      │ │   │ ├── boom@2.10.1 
      │ │   │ ├── cryptiles@2.0.5 
      │ │   │ ├── hoek@2.16.3 
      │ │   │ └── sntp@1.0.9 
      │ │   ├─┬ http-signature@1.1.0 
      │ │   │ ├── assert-plus@0.1.5 
      │ │   │ ├─┬ jsprim@1.2.2 
      │ │   │ │ ├── extsprintf@1.0.2 
      │ │   │ │ ├── json-schema@0.2.2 
      │ │   │ │ └── verror@1.3.6 
      │ │   │ └─┬ sshpk@1.7.1
      │ │   │   ├── asn1@0.2.3 
      │ │   │   ├── assert-plus@0.2.0 
      │ │   │   ├─┬ dashdash@1.10.1
      │ │   │   │ └── assert-plus@0.1.5 
      │ │   │   ├── ecc-jsbn@0.1.1 
      │ │   │   ├── jodid25519@1.0.2 
      │ │   │   └── jsbn@0.1.0 
      │ │   ├── is-typedarray@1.0.0 
      │ │   ├── isstream@0.1.2 
      │ │   ├── json-stringify-safe@5.0.1 
      │ │   ├── node-uuid@1.4.7 
      │ │   ├── oauth-sign@0.8.0 
      │ │   ├── qs@5.2.0 
      │ │   ├── stringstream@0.0.5 
      │ │   ├── tough-cookie@2.2.1 
      │ │   └── tunnel-agent@0.4.2 
      │ ├─┬ optimist@0.6.1 
      │ │ ├── minimist@0.0.10 
      │ │ └── wordwrap@0.0.3 
      │ └── sf@0.1.7 
      ├─┬ softap-setup@1.1.4 
      │ ├─┬ nconf@0.7.2 
      │ │ ├── async@0.9.2 
      │ │ ├── ini@1.3.4 
      │ │ └─┬ yargs@3.15.0 
      │ │   ├── camelcase@1.2.1 
      │ │   ├─┬ cliui@2.1.0 
      │ │   │ ├─┬ center-align@0.1.2 
      │ │   │ │ ├─┬ align-text@0.1.3 
      │ │   │ │ │ ├─┬ kind-of@2.0.1 
      │ │   │ │ │ │ └── is-buffer@1.1.1 
      │ │   │ │ │ ├── longest@1.0.1 
      │ │   │ │ │ └── repeat-string@1.5.2 
      │ │   │ │ └── lazy-cache@0.2.7 
      │ │   │ ├── right-align@0.1.3 
      │ │   │ └── wordwrap@0.0.2 
      │ │   ├── decamelize@1.1.2 
      │ │   └── window-size@0.1.4 
      │ └─┬ node-rsa@0.2.26 
      │   ├── asn1@0.2.3 
      │   └── lodash@3.3.0 
      ├── when@3.7.7 
      └── xtend@4.0.1

Is the above location in your PATH? echo $PATH

Hi,

I have the same problem:

particle cloud login
-bash: particle: command not found

This is the location of my particle-cli:

/usr/local/lib/node_modules/particle-cli

Any ideas?

What does your PATH variable look like? You can check by running echo $PATH in your terminal app.

-iMac:particle-cli macbook$

I had a related issue - particle command worked, but was not referencing my global (macports) node, and serial port was not installing correctly to boot. so I couldn’t monitor serial port or do non-OTA update.
in attempt to start from scratch, I’ve

sudo npm uninstall -g particle-cli

I removed the peculiar path - so there is only one node on my system.

$ which node
/opt/local/bin/node
$ node -v
v4.4.3

now when I

$ sudo npm install -g particle-cli

it fails heavily on

npm install node-pre-gyp node-pre-gyp-github

(full stderr here)

yet when I do that step manually (with sudo)

sudo npm install node-pre-gyp node-pre-gyp-github

all is successful.

so the sudo does not appear to apply to the inner loop / dependencies ?

I’ve looked elsewhere and the serial port seems to be a problem, generally.

I’ll try again & post back any final answer here.

Meanwhile if anyone has any ideas…

I’m on OSX Yosemite

You may want to try the script I created. It installs the the Particle toolchain and dependencies for you, and makes it easier to build your code. https://github.com/nrobinson2000/po-util

Build Status

I am having this same issue.
I tried the script ^^ that installs the toolchain but it still won’t work?
when I type particle it just says -bash particle not found.

I have also tried editing my $PATH file to include the path to …/particle-cli/bin but that hasn’t seemed to have made a difference.

I would appreciate any advice on how to get this working?

edit: I am also on OSx Yosemite

@dalymople

Did node and npm install properly?

What do you get when you run node -v or npm -v ?

Also, what happens if you do which particle ? Does it find the particle command?

If node or npm are not installed, try getting the Mac Installer for Node from https://nodejs.org/en/download/current/ and running it.

If the particle command is not found, try running:
sudo npm install -g particle-cli

@nrobinson2000 thanks for the quick reply.

the install seems to work fine, it just returns warnings for various ‘deprecated’ things.
the versions are; v6.6.0 for node and v3.10.3 for npm

The sudo and non-sudo both have the same result.

The command ‘which particle’ doesn’t return anything? No errors or text, terminal just brings up a new line

@dalymople
If which particle doesn’t return anything, then the particle command was not found in any of the directories in your $PATH.

The particle command is actually an symbolic link that goes to /usr/lib/node_modules/particle-cli/bin/particle.js

What if you create the link?

sudo ln -s /usr/lib/node_modules/particle-cli/bin/particle.js /usr/bin/particle

sorry for hijacking this thread!
@nrobinson2000 I think I have found the issue, that file path does not exist in my system. I have /usr/local/lib/particle-cli/bin or /usr/local/node_modules (which is an empty folder) /usr/bin is also empty. /usr/local/bin has plenty of files in it, but it does not have a particle one.

Have I managed to install the whole thing to the wrong directory?

If I use the above command to point to the actual installed directory am I on the write track?

@dalymople

Sorry for the confusion. The above file path was for Linux.

Here’s what you need to do.
sudo ln -s /usr/local/lib/particle-cli/bin/particle.js /usr/local/bin/particle

I really don’t know why you are having this error. I think we will be able to solve it though.