Library search added to CLI


#1

The latest CLI prerelease now has library search with particle library search. Work on library support in Dev is going well and we want to publish a prerelease here shortly.

See the updated installation instructions here: Steps to use libraries 2.0


#2

Works nicely

(I took the liberty to alter the link to the first post in the thread)


#3

@jvanier, was there some change recently which broke compatibility with node 4.2.3?
I’ve just upgraded from particle-cli@2.0.0-libraries.8 to particle-cli@2.0.0-libraries.13

But now I get this

C:\Users\Andy\Dropbox\DokumenteAndy\Particle\RGBMatrixAnimations>particle library search neo
module.js:339
    throw err;
    ^

Error: Cannot find module 'yeoman-environment/lib/adapter.js'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli\dist\cli\library_init.js:18:23)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)

This was the output of my upgrade attempt (which doesn’t seem too bad)

C:\Users\Andy\Dropbox\DokumenteAndy\Particle\RGBMatrixAnimations>npm uninstall -g particle-cli
unbuild particle-cli@2.0.0-libraries.8

C:\Users\Andy\Dropbox\DokumenteAndy\Particle\RGBMatrixAnimations>npm install -g https://github.com/spark/particle-cli/releases/download/v2.0.0-libraries.13/particle-cli-2.0.0-libraries.13.tgz
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> ../../../ie8-polyfill.js
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> ../../../ie8-polyfill.js

> spawn-sync@1.0.15 postinstall C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\particle-commands\node_modules\yeoman-environment\node_modules\inquirer\node_modules\
external-editor\node_modules\spawn-sync
> node postinstall


> spawn-sync@1.0.15 postinstall C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\particle-commands\node_modules\yeoman-generator\node_modules\yeoman-test\node_modules
\inquirer\node_modules\external-editor\node_modules\spawn-sync
> node postinstall

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

[serialport] Success: "C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\serialport.node" is installed via remote
C:\Users\Andy\AppData\Roaming\npm\particle -> C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@2.0.0-libraries.13 C:\Users\Andy\AppData\Roaming\npm\node_modules\particle-cli
β”œβ”€β”€ cli-spinner@0.2.5
β”œβ”€β”€ semver@5.3.0
β”œβ”€β”€ xtend@4.0.1
β”œβ”€β”€ 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)
β”œβ”€β”€ temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
β”œβ”€β”€ es6-promisify@4.1.0 (es6-promise@3.3.1)
β”œβ”€β”€ cli-table@0.3.1 (colors@1.0.3)
β”œβ”€β”€ form-data@1.0.0-relativepath.2 (async@1.5.2, combined-stream@1.0.5, mime-types@2.1.12)
β”œβ”€β”€ glob@4.5.3 (inherits@2.0.3, once@1.4.0, inflight@1.0.5, minimatch@2.0.10)
β”œβ”€β”€ node-wifiscanner2@1.2.0 (os-locale@1.4.0)
β”œβ”€β”€ 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, readline2@1.0.1, string-width@1.0.2, cli-cursor@1.0
.2, run-async@0.1.0)
β”œβ”€β”€ when@3.7.7
β”œβ”€β”€ binary-version-reader@0.4.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
β”œβ”€β”€ latest-version@2.0.0 (package-json@2.4.0)
β”œβ”€β”€ hogan.js@2.0.0
β”œβ”€β”€ yargs@5.0.0 (get-caller-file@1.0.2, decamelize@1.2.0, lodash.assign@4.2.0, y18n@3.2.1, which-module@1.0.0, set-blocking@2.0.0, require-directory@2.1.1, require-main-filename@1.0.1, windo
w-size@0.2.0, yargs-parser@3.2.0, os-locale@1.4.0, string-width@1.0.2, cliui@3.2.0, read-pkg-up@1.0.1)
β”œβ”€β”€ request@2.75.1-relativepath.1 (tunnel-agent@0.4.3, aws-sign2@0.6.0, forever-agent@0.6.1, oauth-sign@0.8.2, caseless@0.11.0, is-typedarray@1.0.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.3.1, qs@6.2.1, node-uuid@1.4.7, combined-stream@1.0.5, mime-types@2.1.12, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-valid
ator@2.0.6)
β”œβ”€β”€ particle-api-js@6.0.6 (superagent-prefix@0.0.2, stream-http@2.2.1, superagent@2.3.0, form-data@1.0.0-rc4)
β”œβ”€β”€ handlebars@4.0.5 (async@1.5.2, source-map@0.4.4, optimist@0.6.1, uglify-js@2.7.3)
β”œβ”€β”€ moment@2.15.1
β”œβ”€β”€ lodash@3.10.1
β”œβ”€β”€ softap-setup@1.1.4 (nconf@0.7.2, node-rsa@0.2.30)
β”œβ”€β”€ babel-runtime@6.11.6 (regenerator-runtime@0.9.5, core-js@2.4.1)
β”œβ”€β”€ particle-commands@0.1.6 (yeoman-generator@0.24.1, yeoman-environment@1.6.4, particle-library-manager@0.0.5)
└── serialport@3.1.2 (bindings@1.2.1, commander@2.9.0, es6-promise@3.3.1, debug@2.2.0, nan@2.4.0, object.assign@4.0.4)

Update:
After doing

npm install -g yeoman-environment

I’m back running again :blush:


#4

Thanks. Mat looking into this. I’ll release a new beta today or tomorrow with the fix. As always your help is appreciated!


#5

@jvanier, @ScruffR, I had the same problem and applied the fix. When I do a particle list, I ger:

Error loading command C:\Users\Paul\AppData\Roaming\npm\node_modules\particle-cli\commands\L
ibraryV1Command.js Error: Cannot find module 'particle-library-manager'

and then the list as expected.


#6

I published beta 14. It installed correctly in a Windows virtual machine and I didn’t see the cannot find module 'particle-library-manager' error so I hope that will fix both of these issues.


#7

I saw that (with 13) too, but npm install -g particle-library-manager did do away with that too.