Npm install -g particle-cli ... Error
I typing npm install -g particle-cli.
But comes up WARN…
How can i solve this problem…
Please help me…

C:\Users\m113>npm install -g particle-cli
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> serialport@3.1.2 install C:\Users\m113\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\m113\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\serialport.node" is installed via remote
C:\Users\m113\AppData\Roaming\npm\particle -> C:\Users\m113\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.16.0 C:\Users\m113\AppData\Roaming\npm\node_modules\particle-cli
├── cli-spinner@0.2.5
├── xtend@4.0.1
├── semver@5.3.0
├── chalk@1.1.3 (supports-color@2.0.0, ansi-styles@2.2.1, escape-string-regexp@1.0.5, has-ansi@2.0.0, strip-ansi@3.0.1)
├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
├── cli-table@0.3.1 (colors@1.0.3)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.3, inflight@1.0.5, minimatch@2.0.10)
├── node-wifiscanner2@1.2.0 (os-locale@1.4.0)
├── inquirer@0.11.4 (ansi-regex@2.0.0, strip-ansi@3.0.1, ansi-escapes@1.4.0, through@2.3.8, rx-lite@3.1.2, figures@1.7.0, cli-width@1.1.1, cli-cursor@1.0.2, run-async@0.1.0, string-width@1.0.1, readline2@1.0.1)
├── when@3.7.7
├── form-data@1.0.0-rc4 (async@1.5.2, combined-stream@1.0.5, mime-types@2.1.11)
├── latest-version@2.0.0 (package-json@2.3.3)
├── binary-version-reader@0.4.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
├── hogan.js@2.0.0
├── request@2.74.0 (aws-sign2@0.6.0, tunnel-agent@0.4.3, oauth-sign@0.8.2, forever-agent@0.6.1, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, aws4@1.4.1, isstream@0.1.2, 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.11, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)
├── moment@2.14.1
├── lodash@3.10.1
├── softap-setup@1.1.4 (nconf@0.7.2, node-rsa@0.2.30)
└── serialport@3.1.2 (bindings@1.2.1, commander@2.9.0, debug@2.2.0, es6-promise@3.2.1, nan@2.4.0, object.assign@4.0.4)

Does the command particle work?



Welcome to the Particle Command line utility!
Version 1.16.0

Usage: particle <command_name> <arguments>
Common Commands:

    setup, list, call, get, device, identify, flash, subscribe
    compile, monitor, login, logout, help

Less Common Commands:
    token, binary, cloud, config, function, keys, serial, udp
    update, variable, webhook, wireless

For more information Run: particle help <command_name>

is it okay??

Looks ok to me :slight_smile:

but why comes up this problem…???

It’s a warning but not an error to inform of a newer package than the currently bundled one.

so is it okay???

Like i mentioned earlier it’s ok.

thank you !!!
I have one question…
I want to connect to electron.
When i typing “particle setup wifi”, comes up error message.
Error message is
"Something went wrong: [Error : Opening COM3: Access denied]"

Did you install the usb serial driver for the photon?

Don't double post the same question, it is already dealt with in this thread!

Electrons don't have a WiFi module!

1 Like

Mine has given me many errors, look:

*******-MacBook-Pro:~ **********$ npm install -g particle-cli
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules’
npm ERR! stack: ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/**********/.npm/_logs/2017-12-04T23_40_01_680Z-debug.log

Is that ok to show everyone? (I put stars in)
And that is running as admin

Do a sudo npm install - g particle-cli


Thanks alot!
Btw how do you write in code format like that again?

You can use markdown like

`place your code here`


place your code block here


ok, but now the code keeps looping this:

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/particle-cli/node_modules/serialport/.node-gyp"

scroll right

Or try:

sudo npm install -g --unsafe-perm node-pre-gyp npm serialport particle-cli 
1 Like

Ok, thank you. That worked, but what was going wrong?
(I want to learn something from this, Do you mind?)

  1. You need to move the default directory where node modules are installed so that you don’t run into permission issues
  2. The serialport node module has issues when it comes to installation and --unsafe-perm helps to unblock some operations that may fail.