Need to reinstall Particle-CLI again and again

Every time connect my Photon and type in

particle some_command

, the command is not recognized, so I need to reinstall it particle CLI using the lines below and then it works.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 0.10
npm install -g particle-cli

​Hope you can help me with this.

are you on Mac or Windows?

MAC running Yosemite

This is probably since the commands are not in your $PATH ?

Try:
. ~/.nvm/nvm.sh before running a command and see if that works, alternatively check that . ~/.nvm/nvm.sh is done in your profile.

Try this:

nvm alias default 0.10

That should set the nvm copy of node 0.10 as your default from that point forward.

Also, you definitely shouldn’t have to re-run the whole nvm installation process each time. The nvm command should already be available to you, without doing anything extra. Yes?

thanks… wil try this and let you know next time. For now, I succeeded with my project!! Yeah!