Troubleshoot: Particle-CLI on windows [Q&A]

Hi,

Well I have had VS2013 installed for many years, but I have the Pro version - so I really don’t want to downgrade to an Express :-O.

Surely it MUST work with a licensed version and not just a freebie :-O.

Sorry but it never ceases to amaze me how complex using ‘Open Source’ can get :-O. I really have trouble with having to download and then master a shed-load of tools, just to run one app :-((.

Highly disappointed now - Photon is really GREAT product, and I am already considering how to migrate some products onto P1’s but for production I really need stability :-O.

NB If the tools are built using VS2013 - why not just make the solution files (and associated project files) available so we can just build from the IDE - which has auto-update capability anyway ;-O. Thats why I have a licensed VS in the first place :wink:

Thanks for the continued feedback though - I seem to get a whole lot more support from you Elite guys than from the Particle folk :open_mouth:

BR again
Graham

1 Like

Hi, @GrahamS! Rest assured that even if we’re not the first responders, we’re definitely hear and we get all your feedback! The scattered resources and difficulty of installation, especially on Windows, is something that we want to improve for sure.

3 Likes

Hi,

Glad to hear from you ;-)) - so you DO exist then :smile:

Well I would agree there - the product is Excellent and I can see a great future for it - but (as always when pushing the frontiers) the documentation gets left way behind. Just a half-decent document would REALLY help, rather than the often conflicting advice. I say that not as a criticism - but simply that anything on the Internet becomes so outdated so quickly, that if its more than a couple of weeks old - its quite probably wrong by then :open_mouth: - especially considering the HUGE variety of platforms…

To be honest - I am NOT a great fan of GitHub - as I haven’t got a clue how to use it or find anything useful on there :-O. In my opinion it would be better hosted somewhere separate, where it would stand on its own merits, and allow us to find stuff ;-)). Sorry - but I AM an ‘oldie’, and find (too often) that the newer generations often ‘forget’ the ‘stuff’ we oldies learned years back ;-)). Hey Ho - I’m certain that you (we) will get there eventually…

Right now though I am struggling to use Dev without having CLI - which simply refuses to build, and already did find that viewing my functions and variables is actually better on there - during development…but need CLI to manage devices more efficiently.

BR

Graham

If you find anything wrong with the documentation, feel free to let us, or Particle know. Better yet, click the ‘edit’ button in the top right corner, and propose the changes on Github.

In regards to Github, I’m not the biggest fan either, but it certainly has its uses. Cooperating is certainly much easier when your team is all over the world, and you’d like to have the community make contributions.
Even though it’s not the most noob-friendly, it’s mostly a big folder with subdirectories. You can browse them like you would on your own OS. That said, you could also download the whole thing, and check it out locally.

Rest assured that Particle is hard at work trying to make this all run smoothly. The Elite treat symptoms, Particle fixes the actual issues :wink:

2 Likes

Experts, I need help with the following error that I get in windows 10. After installing Particle-CLI, I got the below error

C:\Users\ssssssss>particle login
This program is blocked by group policy. For more information, contact your system administrator.

C:\Users\ssssssss>particle setup
This program is blocked by group policy. For more information, contact your system administrator.

My goal is just to use Webhooks . I am not trying to connect my core to the computer. Are there any other methods to use Webhooks without using the particle CLI?

Any help would be appreciated. Thanks

EDIT: Solved. Solution in my original post.

(Sorry this is kind of a repost. This thread seemed more appropriate for this question. Original post is here [Solved] "Program blocked" error Particle CLI for Webhooks in Windows)

Can’t get particle-cli installed on my win10 computer. I followed the instructions here, but I keep on getting the following message.

C:\particle-cli-master\bin>npm install -g particle-cli

npm WARN engine particle-cli@1.8.22: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hawk@3.1.2: wanted: {"node":">=0.10.32"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.29","npm":"1.4.14"})
> serialport@2.0.5 install C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

-
C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean
/
C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32\serialport.node --module_name=serialport --module_path=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\Rutger\\AppData\\Roaming\\npm\\node_modules\\particle-cli\\node_modules\\serialport\\build\\Release\\node-v11-win32-ia32\\serialport.node" "--module_name=serialport" "--module_path=C:\\Users\\Rutger\\AppData\\Roaming\\npm\\node_modules\\particle-cli\\node_modules\\serialport\\build\\Release\\node-v11-win32-ia32"
gyp ERR! cwd C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32\serialport.node --module_name=serialport --module_path=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:755:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:822:5)
node-pre-gyp ERR! System Windows_NT 6.2.9200
node-pre-gyp ERR! command "node" "C:\\Users\\Rutger\\AppData\\Roaming\\npm\\node_modules\\particle-cli\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.10.29
node-pre-gyp ERR! node-pre-gyp -v v0.6.13
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32\serialport.node --module_name=serialport --module_path=C:\Users\Rutger\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-ia32' (1)
npm ERR! serialport@2.0.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.5 install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! cwd C:\particle-cli-master\bin
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\particle-cli-master\bin\npm-debug.log
npm ERR! not ok code 0

Two things going on.

  1. your Node.js version is a bit old:

wanted: {“node”:">=0.10.40"} (current: {“node”:“v0.10.29”,“npm”:“1.4.14”}

I suggest updating to 0.12.7, but higher one should work. 0.12.7 is confirmed to be working though.

2. serial port is being a bit of a pain again…
Could you try npm install -g serialport?

1 Like

Great!!! The first advice did the trick.

Used the particle update command but that didnt work, then found some other advice and finally, after more than half a year, I got my cores up and running again.

Thanks a lot (superveel dank)!! Without all of your help, I would never gotten this far!

1 Like

Now getting this error on 4 systems and a fresh format with all directions followed by tutorial…

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\User>npm install npm
npm@3.9.3 node_modules\npm

C:\Users\KeithReilly>npm install -g particle-cli
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/spark/form-data.git) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu
b.com/spark/form-data.git) undefined
npm ERR! git clone git://github.com/spark/form-data.git undefined
npm ERR! git clone git://github.com/spark/form-data.git undefined
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "particle-cl
i"
npm ERR! cwd C:\Users\User
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ENOGIT
npm ERR! not ok code 0

C:\Users\User>npm install -g spark-cli
npm WARN deprecated spark-cli@1.4.2: spark-cli has been moved to particle-cli
npm ERR! git clone https://github.com/spark/node-wifiscanner.git undefined
npm ERR! git clone https://github.com/spark/node-wifiscanner.git undefined
npm ERR! git clone https://github.com/spark/node-spinner.git undefined
npm ERR! git clone https://github.com/spark/node-spinner.git undefined
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "spark-cli"
npm ERR! cwd C:\Users\User
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ENOGIT
npm ERR! not ok code 0

Also got it after an upgrade on an already known good system. Upgraded from 0.10.40 to 4.XX, and this happened. Also tried to go back and it happened just the same.

Have you tried checking that?

Umm how?

-Multiple Systems (one with a brand new Windows instal)
-Different Node Installers
-32Bit and 64bit

Still didn’t work. Also followed Kenneth’s guide to the letter except for them I tried to install Node 4.00 and it broke everything.

It also worked the previous everytime I installed node to the system path. Every single time… It even is an option to the installer that is selected and is adding it to the path.

Keep in mind that not everyone is a coder and understands how coding and object based coding children work in the OS level. Most people in my experience who post here seem to understand coding, but when someone like me posts we get so confused we just give up.

It can’t find Git. If you try installing that, it might help.

I did do that. The installer for github and the main installer. Also C++ desitro

Is Git also in the path?

It also worked the previous everytime I installed node to the system path. Every single time… It even is an option to the installer that is selected and is adding it to the path.

Yes

I know that feeling.
Pre 1.13.0 versions of CLI didn’t need Git in order to install, but the newer versions do.
So “it previously worked” does not indicate that Git was part of your path, hence better double-check.

2 Likes

Thanks, that was very useful. (genuine)

I have Github installed, (fresh), but still get the error. I also tried

npm install git

but no go. Any other ideas? Maybe what the Environmental variable should be? I found a similar topic on this, (not related to particle), but it’s EV didn’t work either.

Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\kreilly>npm install git
git@0.1.5 node_modules\git
└── mime@1.2.9

C:\Users\kreilly>

I’m releasing a new version that will fix this issue by not using git anymore. It will be up very shortly.

Very much appreciated man, always a pleasure.

I had a suggestion I made a new topic for that might be worth it. If I can figure out how, I could make it myself.

Getting the error below when running any particle command.
Commands seem to work ok, haven’t tried serial monitor though.
OS: Windows 7 Enterprise
Node: 6.9.5 LTS

   λ particle
Error loading command C:\Users\collig\AppData\Roaming\npm\node_modules\particle-cli\commands\SerialCommand.js Error: %1 is not a valid Win32 application.
\\?\C:\Users\collig\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\serialport.node

Welcome to the Particle Command line utility!
Version 1.19.2
https://github.com/spark/particle-cli

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

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

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

For more information Run: particle help <command_name>