Unknown Command: "library" Particle CLI

So I had a library that was public. Tried to share an application with another user but Build threw the error that I was including Libraries that were not public. Seems a library I had under Community Libraries was no longer public. I have not messed with public libraries since the recent change.

Found out I needed to use the CLI which is perfectly cool with me. I updated my CLI as I had not done so in a while but it does not recognize the library command:

Traviss-MacBook-Pro:~ travis$ particle library list
particle: Unknown command: "library"

Running on mac. Version of Particle CLI appears to be 0.1.4

:joy: where did you get that ol’ version from

Current version of CLI is 1.23.1

Maybe uninstall all instances of CLI and then do a fresh install.

To tell appearance from reality, you can check the version via

particle --version

What lib are you looking for, we can check whether it’s public or not

Crap, sorry. I ran a version check on npm not the library(what an idiot). particle cli version is 1.17.2 I just ran an npm update this morning so I guess that’s the latest roll out for Mac on npm?

Library is NCD2Relay

I can see NCD2Relay v0.0.7

Strange. I am getting an error when trying to Share Revision on Build. The NCD2Relay library is showing up in my Library repo as 1.0.8 Since it is my library I cannot pull up the on listed under Community Libraries on Build(really wish that were not the case). Any ideas on what to do here?

If you want to publish it you could try particle library publish (with a CLI v1.20.0 or higher) from within the library folder where the library.properties file lives.

But the lib has to comply the libraries v2.0 standard.

To check my personal libraries as seen by the public, I have a secondondary account.

I ran npm update -g particle-cli Friday and today but the latest I can get is 1.17.2 What gives? Is it because I’m on Mac? Not sure that would be OS dependent or not since it’s Node JS(npm). At this point I have no way to maintain public libraries on Mac since you can’t do it through Build or Dev.

It seems you have got multiple instances of CLI installed.
You update one but run another.

That’s why I earlier said

After you once did

sudo npm uninstall -g particle-cli
sudo npm uninstall particle-cli

and after that try to run particle --version again.
Only when you get a not-found message run

sudo npm install -g particle-cli

Thanks man. What is that -g flag just out of curiosity? I’ve got 1.23.1 installed now. Tried looking for npm -g flag on google but didn’t see anything on first glance.

-g stands for global - without it the package would be downloaded and installed in the local directory you execute that command, hence multiple instances could exist and you’d see different versions start depending on where you run it from.

1 Like

Great thanks @ScruffR