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


#61

@kennethlimcp this is adding evidence that my Particle-CLI runtime environment is not using the company’s web proxy (because, my web browser on the same machine and network can browse the internet a.okay).

I tried some time ago to configure node.js to use a web proxy, but that did not help.

Will report back tomorrow with error messages.


#62

@kennethlimcp nothing new to report, it is as described, no connection:

particle login
? Please enter your email address: *****************
? Please enter your password: *********
. Sending login details…! There was an error logging you in! Let’s try again.
! Login Failed: Error: connect ETIMEDOUT

  • Sending login details…

Conclusion: Particle-CLI is not using a proxy to get out to the internet. I do not know if it can use a proxy, and if it can, how to configure it to do so…

Thanks - @UMD


#63

Hmmm ping @dave


#64

Oh, good question! We could totally add that as a configuration setting, I’ll open an issue for it…

here: https://github.com/spark/particle-cli/issues/108

I suspect you could force it to use your proxy server by setting some environment variables:

HTTPS_PROXY

Thanks,
David


#65

I have previously installed successfully on a Win 7 machine. I just received a Win 10 machine and tried to install after downloading node-v4.2.1-x64.msi from the website. That failed and I can provide a text from the Command Prompt application showing what the messages were. Suffice it to say that the failure was major, and as I looked at this posting it seemed somewhat out of date. The Command Prompt output error messages started with
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10240

I am guessing the install failed due to the presence of Win10?
Your description of what to load on has mixed 32b Intel and 64b AMD info. I have an Intel Core i5 (64b Intel), and the node-v4.2.1-x64.msi downloaded from your site
seems to be a 64b variant, but you tutorial warns against mixing 32b and 64b components, but provides no 64b component links for node.js (different from what I downloaded from your site), and openssl.
I am working for a client that is trying to implement your device into an existing project, and has been working with your device to do so, and schedule is becoming tougher so would greatly appreciate a quick response.
Thanks!



#66

Hi @kennethlimcp … i installed nodejs 4.2.2, and after checking that i started having some problems with particle serial monitor, i uninstalled it, and installed again nodejs v0.10.40 … but when i tried to reinstall particle-cli, i had problems with the serialport issue with a lot of errors

serialport@2.0.4 install C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
node-pre-gyp install --fallback-to-build

C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport>node “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp
.js” clean

C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport>node “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp
.js” configure --fallback-to-build --module=C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64\serialport.node --module_nam
e=serialport --module_path=C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:1011:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:802:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command “node” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “configure” “–fallback-to-build” “–module=C:\Users\tobajas.IUMAWIN\AppData\Roamin
g\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64\serialport.node” “–module_name=serialport” "–module_path=C:\Users\tobajas.IUMAWIN\AppData\Roamin
g\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64"
gyp ERR! cwd C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v1.0.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\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\bui
ld\Release\node-v11-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v
11-win32-x64’ (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\tobajas.IUMAWIN\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:766:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command “node” “C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” "–f
allback-to-build"
node-pre-gyp ERR! cwd C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.10.40
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\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64\s
erialport.node --module_name=serialport --module_path=C:\Users\tobajas.IUMAWIN\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v11-win32-x64’ (1)

npm ERR! serialport@2.0.4 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.4 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.1.7601
npm ERR! command “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “-g” "particle-cli"
npm ERR! cwd C:\Users\tobajas.IUMAWIN
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

… how can i solve this issue and install again particle-cli? Thanks


#67

Hmm are the dependencies for Windows installed properly?


#68

… yes … i just unstalled node.js version 4.2.2 and installed version 0.10.40 again, and after that, i started getting errors when trying to reinstall particle-cli :frowning:


#69

I’m having similar issues. I have Windows 10, if that makes any difference. I can’t figure out how to get the Particle CLI!


#70

Me too - windows 8.1 x64 - CLI was working, then I tried to ‘update’ and all hell broke loose :-(.


#71

I had the same problem. I had an older Studio 2010 version and not installed Studio Express 2013 for Desktop before though I did have openssl. I also made sure I have python 2.7.x and nodejs installed (nodejs 0.12.0 seems to work fine). I removed all the 2010 stuff and then installed the Express 2013 as per the posted tutorial. I then re-installed particle CLI and everything worked. Some recent CLI fix seems to require Studio 2013 to work.


#72

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


#73

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.


#74

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


#75

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:


#76

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)


#77

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

#78

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?


#79

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!


#80

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.