CLI on Windows 10 stopped working

I have been using CLI on Windows 10 - have successfully flashed several devices and now all of a sudden get the following message. What is the cause and how should I recover?

Flash success!

C:\Users\wjsteen>particle flash --usb firmware.bin
 !   Error in particle-cli:
 !   Cannot find module 'is-plain-obj'
 !   See C:\Users\wjsteen\AppData\Local\particle\error.log for more info.

C:\Users\wjsteen>

error.log

2016/12/02 14:41:38 particle: Installing plugins...
2016/12/02 14:42:20 particle: Installing plugins...
2016/12/02 14:42:20 not supported by windows
2016/12/02 14:42:26  done
2016/12/08 16:28:05 Updating Particle CLI to 0.2.0-384995c (master)... 
2017/01/11 09:20:01 Updating CLI... 
2017/01/11 09:20:27 no plugins to update.
2017/01/23 13:42:24  ▸    Error updating CLI
2017/01/23 13:42:24  !    Get https://binaries.particle.io/cli/master/manifest.json: dial tcp 54.239.168.148:443: i/o timeout
2017/01/23 13:42:24 Updating CLI... 
2017/01/23 13:42:42 no plugins to update.
2017/02/17 11:23:57 Updating CLI... 
2017/02/17 11:24:58 not supported by windows
2017/02/17 11:26:19 
2017/02/17 11:26:19  !    Error installing package. 
 !    npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> ../../../ie8-polyfill.js
 !    npm WARN deprecated node-uuid@1.4.7: use uuid module instead
 !    npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> ../../../ie8-polyfill.js
 !    npm ERR! Windows_NT 10.0.14393
 !    npm ERR! argv "C:\\Users\\wjsteen\\AppData\\Local\\particle\\node-v5.4.1-windows-x64\\bin\\node.exe" "C:\\Users\\wjsteen\\AppData\\Local\\particle\\node-v5.4.1-windows-x64\\lib\\node_modules\\npm\\cli.js" "install" "particle-cli@1.19.4"
 !    npm ERR! node v5.4.1
 !    npm ERR! npm  v3.3.10
 !    
 !    npm ERR! Maximum call stack size exceeded
 !    npm ERR! 
 !    npm ERR! If you need help, you may report this error at:
 !    npm ERR!     <https://github.com/npm/npm/issues>
 !    
 !    npm ERR! Please include the following file with any support request:
 !    npm ERR!     C:\Users\wjsteen\AppData\Local\particle\npm-debug.log
 !    
 !    Try running again with GODE_DEBUG=info to see more output.
2017/02/17 11:26:20 remove C:\Users\wjsteen\AppData\Local\particle\updating.lock.particle-cli: The system cannot find the file specified.
2017/02/17 11:26:20 done. Updated 1 package.
2017/02/17 12:15:30 Error: Cannot find module 'is-plain-obj'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\wjsteen\AppData\Local\particle\node_modules\got\index.js:21:18)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
2017/02/17 12:15:55 Error: Cannot find module 'is-plain-obj'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\wjsteen\AppData\Local\particle\node_modules\got\index.js:21:18)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
2017/02/17 12:16:07 Error: Cannot find module 'is-plain-obj'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\wjsteen\AppData\Local\particle\node_modules\got\index.js:21:18)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)

Just got a very similar message completely out of the blue - went to compile and get installing plugins (which times out, then it tries to retry)
Then it says: error reading plugin: particle-cli exit status 1 module.js :327 threw error cannot find module package.json?!

Have you had CLI installed with the Installer?
If so, you can try particle update-cli
If not, remove CLI via npm uninstall -g particle-cli and reinstall with the installer.


Update:
Apparently there really is something fishy - I now get the same error, so it’s probably some issue with the hosting servers - I’ll ping Particle folks.

Ah phew. Hey @ScruffR - for once, it wasn’t me!! Wahoo!! :wink: :wink:
THANKS for your help Scruff.
Much appreciated.

1 Like


Status page shows nothing wrong. And the forum isn’t filled with people unable to compile. Is that because not that many people are wanting to use CLI on a Sunday?

CLI packages are not a monitored resource for the cloud status page and CLI misbehaviours are usually reporeted by users with some delay as there are alternative tools for building and flashing OTA.

YES…happen to me too, identical problem. It was working 2 weeks ago.
I uninstalled and re-installed today, still not working.

Seem it happens after Window 10 push an update few days ago on my laptop.

Was working fine around 11am UTC 7/1/18, could compile and flash. The serial monitor then threw up an error even though was working fine up to this point. I did see a request to update… tried uninstall/install that seemed to work but failes on particle setup
.
! Error reading plugin: particle-cli
! exit status 1
! module.js:327
! throw err;
! ^
.

Would it be an issue with NPM, see a lot of keepalive messages coming from the servers there?

Hi all,

I’m able to reproduce the problem. A new version of an npm dependency for the CLI was released 2 days ago and that version is preventing the CLI from installing.

I’ll release 1.32.2 shortly to work around this issue.

4 Likes

Alright, CLI version 1.32.2 is out with a fix.

Run particle update-cli or rerun the Windows CLI installer to get the CLI back in shape.

3 Likes