# Error when installing CLI (node.js) - \[SOLVED + complete guide on how to install Particle CLI correctly!\]

**URL:** <https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840>\
**Category:** Troubleshooting\
**Created:** [May 16, 2015, 12:10pm UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840 "2015-05-16T12:10:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![HappyCookie](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/happycookie/32/3505_2.png) [@HappyCookie](https://community.particle.io/u/HappyCookie)\
**Post date:** [May 16, 2015, 12:10pm UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/1 "2015-05-16T12:10:03Z")

</div>

Hi Everyone!  
When I try to execute `npm install -g particle-cli` (or spark-cli for that matter), I get the following error.  
It seems like it misses something from github? Probably due to the name change from spark to particle? (im just guessing here)  
My system is win 8.1. I’ve installed microsoft visual c++ 2008, Python 2.7.6, and OpenSSL).  
Cheers 🙂

```
    Your environment has been set up for using Node.js 0.12.3 (x64) and npm.

C:\Users\Mark>npm isntall -g particle-cli
npm WARN engine particle-cli@1.5.3: wanted: {"node":"^0.10.0"} (current: {"node"
:"0.12.3","npm":"2.9.1"})
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:40:28)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:43:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modul
es\which\which.js:54:16
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:95:15)
npm WARN addRemoteGit git+https://github.com/spark/node-wifiscanner.git resetti
ng remote C:\Users\Mark\AppData\Roaming\npm-cache\_git-remotes\https-github-com-
spark-node-wifiscanner-git-0908929e because of error: { [Error: not found: git]
code: 'ENOGIT' }
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:40:28)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_mo
dules\which\which.js:43:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modul
es\which\which.js:54:16
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:95:15)
npm WARN addRemoteGit git+https://github.com/spark/node-spinner.git resetting r
emote C:\Users\Mark\AppData\Roaming\npm-cache\_git-remotes\https-github-com-spar
k-node-spinner-git-a8ff6b49 because of error: { [Error: not found: git] code: 'E
NOGIT' }
npm ERR! git clone --template=C:\Users\Mark\AppData\Roaming\npm-cache\_git-remot
es\_templates --mirror https://github.com/spark/node-wifiscanner.git C:\Users\Ma
rk\AppData\Roaming\npm-cache\_git-remotes\https-github-com-spark-node-wifiscanne
r-git-0908929e: undefined
npm ERR! git clone --template=C:\Users\Mark\AppData\Roaming\npm-cache\_git-remot
es\_templates --mirror https://github.com/spark/node-wifiscanner.git C:\Users\Ma
rk\AppData\Roaming\npm-cache\_git-remotes\https-github-com-spark-node-wifiscanne
r-git-0908929e: undefined
npm ERR! git clone --template=C:\Users\Mark\AppData\Roaming\npm-cache\_git-remot
es\_templates --mirror https://github.com/spark/node-spinner.git C:\Users\Mark\A
ppData\Roaming\npm-cache\_git-remotes\https-github-com-spark-node-spinner-git-a8
ff6b49: undefined
npm ERR! git clone --template=C:\Users\Mark\AppData\Roaming\npm-cache\_git-remot
es\_templates --mirror https://github.com/spark/node-spinner.git C:\Users\Mark\A
ppData\Roaming\npm-cache\_git-remotes\https-github-com-spark-node-spinner-git-a8
ff6b49: undefined
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "isntall" "-g" "particle-cli"
npm ERR! node v0.12.3
npm ERR! npm v2.9.1
npm ERR! code ENOGIT

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! Please include the following file with any support request:
npm ERR! C:\Users\Mark\npm-debug.log

C:\Users\Mark>
```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [May 16, 2015, 2:49pm UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/2 "2015-05-16T14:49:56Z")

</div>

Can you use v0.10 nodejs instead?

> [@HappyCookie](#):
>
> npm WARN engine particle-cli@1.5.3: wanted: {"node":"^0.10.0"} (current: {"node"  
> :"0.12.3","npm":"2.9.1"})

---

<div class="post-metadata">

**Author:** ![sazp96](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/sazp96/32/4153_2.png) [@sazp96](https://community.particle.io/u/sazp96)\
**Post date:** [May 16, 2015, 10:03pm UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/3 "2015-05-16T22:03:14Z")

</div>

Hey guys, I’m having the same issue and I’m running version 10.38.

```
C:\Users\sergio>npm install -g particle-cli
npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/spark/node-w
ifiscanner.git) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/spark/node-w
ifiscanner.git) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/spark/node-s
pinner.git) undefined
npm WARN `git config --get remote.origin.url` returned wrong result (https://github.com/spark/node-s
pinner.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! git clone https://github.com/spark/node-wifiscanner.git undefined
npm ERR! git clone https://github.com/spark/node-wifiscanner.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\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\n
pm\\bin\\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! cwd C:\Users\zamora_sergio
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ENOGIT
npm ERR! not ok code 0
```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [May 16, 2015, 11:35pm UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/4 "2015-05-16T23:35:33Z")

</div>

@sazp96,

i think the issue is with the particle-cli using customized package that required `git` in order to install.

Are you able to install git and try again?

I have raised an issue here: [https://github.com/spark/particle-cli/issues/1](https://github.com/spark/particle-cli/issues/1)

Thanks!

---

<div class="post-metadata">

**Author:** ![sazp96](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/sazp96/32/4153_2.png) [@sazp96](https://community.particle.io/u/sazp96)\
**Post date:** [May 17, 2015, 12:06am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/5 "2015-05-17T00:06:55Z")

</div>

@kennethlimcp you are dead on. Not having git installed was an issue (I did had github’s windows client tough… weird).

After I installed git, it said that it couldn’t find Python. So I installed that one as well. Now I’m getting yet another error:

```
C:\Users>npm install -g particle-cli
\
> serialport@1.7.1 install C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node
_modules\serialport
> node-pre-gyp install --fallback-to-build

C:\Users\zamora_sergio\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.j
s" clean

C:\Users\zamora_sergio\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.j
s" configure --fallback-to-build --module=C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\pa
rticle-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11-win32-x64\serialport.nod
e --module_name=serialport --module_path=C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\par
ticle-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11-win32-x64

C:\Users\zamora_sergio\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.j
s" build --fallback-to-build --module=C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\partic
le-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11-win32-x64\serialport.node --
module_name=serialport --module_path=C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particl
e-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11-win32-x64
Building the projects in this solution one at a time. To enable parallel build, please add the "/m"
switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) ins
tall the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of
the component to the system path if it is installed elsewhere. [C:\Users\zamora_sergio\AppData\Roa
ming\npm\node_modules\particle-cli\node_modules\serialport\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit c
ode: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\nod
e-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
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" "build" "--fallback-to-build" "--module=C:\\Users\\zamora_sergio\\AppData\\Roaming\\npm
\\node_modules\\particle-cli\\node_modules\\serialport\\build\\serialport\\v1.7.1\\Release\\node-v11
-win32-x64\\serialport.node" "--module_name=serialport" "--module_path=C:\\Users\\zamora_sergio\\App
Data\\Roaming\\npm\\node_modules\\particle-cli\\node_modules\\serialport\\build\\serialport\\v1.7.1\
\Release\\node-v11-win32-x64"
gyp ERR! cwd C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport
gyp ERR! node -v v0.10.38
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 build --fallback-to-build --module=C:
\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\ser
ialport\v1.7.1\Release\node-v11-win32-x64\serialport.node --module_name=serialport --module_path=C:\
Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\seri
alport\v1.7.1\Release\node-v11-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\zamora_sergio\AppData\Roaming\npm\
node_modules\particle-cli\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:2
9)
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\\zamora_sergio\\AppData\\Roaming\\npm\\node_modules\\par
ticle-cli\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fal
lback-to-build"
node-pre-gyp ERR! cwd C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node_modu
les\serialport
node-pre-gyp ERR! node -v v0.10.38
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\zamora_sergio\AppData\Ro
aming\npm\node_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11
-win32-x64\serialport.node --module_name=serialport --module_path=C:\Users\zamora_sergio\AppData\Roa
ming\npm\node_modules\particle-cli\node_modules\serialport\build\serialport\v1.7.1\Release\node-v11-
win32-x64' (1)

npm ERR! serialport@1.7.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@1.7.1 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\\n
pm\\bin\\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! cwd C:\Users
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [May 17, 2015, 12:57am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/6 "2015-05-17T00:57:57Z")

</div>

The error has some hint to install .NET FRAMEWORK 2.0.

Can you try that ?

---

<div class="post-metadata">

**Author:** ![sazp96](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/sazp96/32/4153_2.png) [@sazp96](https://community.particle.io/u/sazp96)\
**Post date:** [May 17, 2015, 1:09am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/7 "2015-05-17T01:09:30Z")

</div>

@kennethlimcp it seems that the reason why node-pre-gyp is trying to compile something in my computer is because it is not finding a binary for my platform.

From their website: [https://www.npmjs.com/package/node-pre-gyp](https://www.npmjs.com/package/node-pre-gyp)

```
If a a binary was not available for a given platform and --fallback-to-build was used then node-gyp rebuild will be called to try to source compile the module. 

```

I’m running Windows 7 x64.

I will install .NET FW 2.0 and try again.

---

<div class="post-metadata">

**Author:** ![sazp96](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/sazp96/32/4153_2.png) [@sazp96](https://community.particle.io/u/sazp96)\
**Post date:** [May 17, 2015, 2:13am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/8 "2015-05-17T02:13:06Z")

</div>

@kennethlimcp good news. I installed uninstalled Node 10.38 and deleted all the folders it had created in Program Files and in AppData. Then I installed the latest Node (12.3) with the installer located in c:\user\sergio (the previous time the installer was in c:). And it worked.

I’m not quite sure what wast he root cause of the issue. But it worked. It seems it was permissions issue. Below is the cmd output:

```
C:\Users\zamora_sergio>npm install particle-cli -g
npm WARN engine particle-cli@1.5.3: wanted: {"node":"^0.10.0"} (current: {"node":"0.12.3","npm":"2.9
.1"})
-
> serialport@1.7.1 install C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node
_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli\node_mod
ules\serialport\build\serialport\v1.7.1\Release\node-v14-win32-x64\serialport.node" is installed via
 remote
C:\Users\zamora_sergio\AppData\Roaming\npm\spark -> C:\Users\zamora_sergio\AppData\Roaming\npm\node_
modules\particle-cli\bin\particle.js
C:\Users\zamora_sergio\AppData\Roaming\npm\particle -> C:\Users\zamora_sergio\AppData\Roaming\npm\no
de_modules\particle-cli\bin\particle.js
particle-cli@1.5.3 C:\Users\zamora_sergio\AppData\Roaming\npm\node_modules\particle-cli
├── cli-spinner@0.2.0
├── xtend@4.0.0
├── node-wifiscanner@0.2.0
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0
.1, has-ansi@1.0.3)
├── when@3.7.3
├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.7)
├── request@2.55.0 (caseless@0.9.0, json-stringify-safe@5.0.0, aws-sign2@0.5.0, forever-agent@0.6.1,
 stringstream@0.0.4, oauth-sign@0.6.0, tunnel-agent@0.4.0, isstream@0.1.2, node-uuid@1.4.3, qs@2.4.2
, combined-stream@0.0.7, form-data@0.2.0, mime-types@2.0.11, http-signature@0.10.1, bl@0.9.4, tough-
cookie@1.1.0, hawk@2.3.1, har-validator@1.7.0)
├── hogan.js@2.0.0
├── moment@2.10.3
├── softap-setup@1.1.4 (nconf@0.7.1, node-rsa@0.2.23)
├── inquirer@0.8.4 (figures@1.3.5, ansi-regex@1.1.1, cli-width@1.0.1, through@2.3.7, readline2@0.1.1
, lodash@3.8.0, rx@2.5.2)
└── serialport@1.7.1 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.8.4, debug@2.2.0, optimist@0.6.1)

```

Note that node-pre-gyp is still failing and falling back to build.

Thanks for all the help @kennethlimcp !!

@HappyCookie, try installing/re-installing git, but during setup, pick the option showed below:

[http://git-scm.com/download/win](http://git-scm.com/download/win)  
 ![](https://community.particle.io/uploads/particle/5366/ac02d896eda828c9.png)

---

<div class="post-metadata">

**Author:** ![HappyCookie](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/happycookie/32/3505_2.png) [@HappyCookie](https://community.particle.io/u/HappyCookie)\
**Post date:** [May 17, 2015, 9:07am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/9 "2015-05-17T09:07:34Z")

</div>

Hi there!  
Thanks for you help guys, @sazp96, @kennethlimcp! I figured it out with your help!  
I didn't install 0.10 because it was stated nowhere. So was it for Git....  
In other words; this guide is incomplete: [http://docs.particle.io/core/cli/](http://docs.particle.io/core/cli/) (see below for the complete windows version 🙌)

For me, it remains strange that I've to install **6** different programs in order to change the WiFi password on my spark and use the serial monitor... (that's all I wanted 😕 ).

Few notes:

- When installing a program - do **not** change the installation path.
- On win 8.1 - .NET 2.0 can't be installed (easily). luckily 4.5.2 does the trick for me!
- In the end installed node.js 0.10.

* * *

So to summarize, you have to install the flowing:

- Install node.js 0.10 (just to be sure). It's a little bit hidden so here's a link: [Index of /dist/v0.10.38/x64/](http://nodejs.org/dist/v0.10.38/x64/) (download .msi)
- Install OpenSSL: [https://dl.dropboxusercontent.com/u/36134145/Spark-cli/Win32OpenSSL-1\_0\_1h.exe776](https://dl.dropboxusercontent.com/u/36134145/Spark-cli/Win32OpenSSL-1_0_1h.exe776) ([source](https://community.particle.io/t/tutorial-spark-cli-on-windows-11-apr-2015/3112))
- Install Visual Studio Express 2013 for Windows Desktop: [https://dl.dropboxusercontent.com/u/36134145/Spark-cli/vs\_community.exe34](https://dl.dropboxusercontent.com/u/36134145/Spark-cli/vs_community.exe34) ([source](https://community.particle.io/t/tutorial-spark-cli-on-windows-11-apr-2015/3112))
- Install Git: [Git - Downloading Package](http://git-scm.com/download/win)

> [@sazp96](#):
>
> but during setup, pick the option showed below:  
> [https://community.spark.io/uploads/particle/5366/ac02d896eda828c9.png](https://community.spark.io/uploads/particle/5366/ac02d896eda828c9.png)

- Install .NET 4.5: [https://www.microsoft.com/nl-nl/download/details.aspx?id=42642](https://www.microsoft.com/nl-nl/download/details.aspx?id=42642) (if you'r on [\< win7] and it doesn't work try .NET 2.0)
- Install python 2.7.9: [Python Release Python 2.7.9 | Python.org](https://www.python.org/downloads/release/python-279/)
- Open ' node.js command prompt' and type `npm isntall -g particle-cli`
- That should do the trick!

(I'm sure spark... eh.. Particle can do better than this! 😉 )

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [May 17, 2015, 11:23am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/10 "2015-05-17T11:23:36Z")

</div>

All you need is actually serial terminal and the windows driver but particle-cli is more useful and comprehensive 🙂

---

<div class="post-metadata">

**Author:** ![HappyCookie](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/happycookie/32/3505_2.png) [@HappyCookie](https://community.particle.io/u/HappyCookie)\
**Post date:** [May 17, 2015, 11:43am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/11 "2015-05-17T11:43:53Z")

</div>

Like this with putty? 🙂

> [@Installing the USB Driver on Windows & Serial Debugging](https://community.particle.io/t/installing-the-usb-driver-on-windows-serial-debugging/882):
>
> NOTE: These steps are outdated and no driver is required for the latest Windows 10 !!! This installer will clean up old drivers and install a combined driver though if you’d like to try it: [https://github.com/particle-iot/windows-device-drivers/releases/tag/v6.1.0.68](https://github.com/particle-iot/windows-device-drivers/releases/tag/v6.1.0.68) Here are the steps I took to install my Spark Core or Photon USB Driver on Windows 7 / 8.1 pro when I could not find a device in Device Manager. Download the driver: [https://s3.amazonaws.com/spark-website/Spark.zip](https://s3.amazonaws.com/spark-website/Spark.zip) (unzip this …

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [May 17, 2015, 11:53am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/12 "2015-05-17T11:53:25Z")

</div>

Yupp 🙂

---

<div class="post-metadata">

**Author:** ![Matthew1](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/matthew1/32/7638_2.png) [@Matthew1](https://community.particle.io/u/Matthew1)\
**Post date:** [November 6, 2015, 7:28am UTC](https://community.particle.io/t/error-when-installing-cli-node-js-solved-complete-guide-on-how-to-install-particle-cli-correctly/11840/13 "2015-11-06T07:28:42Z")

</div>

Hi @kennethlimcp, thanks for all the help you are providing for Particle! I'm stuck on trying to install Particle CLI. Any help would be so appreciated! This is the cmd prompt response that I get:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\>npm install -g particle-cli  
C:\Users\Mateo\AppData\Roaming\npm\particle -\> C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\bin\particle.js

> serialport@2.0.2 install C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport  
> node-pre-gyp install --fallback-to-build

C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\>if not defined npm\_config\_node\_gyp (node "C:\Program Files\nodejs\node\_modules\npm\bin\node-gyp-bin\....\node\_modules\node-gyp\bin\node-gyp.js" clean ) else (node clean )

C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\>if not defined npm\_config\_node\_gyp (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\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64 ) else (node configure --fallback-to-build --module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64 )

C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\>if not defined npm\_config\_node\_gyp (node "C:\Program Files\nodejs\node\_modules\npm\bin\node-gyp-bin\....\node\_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64 ) else (node build --fallback-to-build --module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64 )  
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t  
argets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v14  
0') cannot be found. To build using the v140 build tools, either click the Proj  
ect menu or right-click the solution, and then select "Update VC++ Projects..."  
. Install v140 to build using the v140 build tools. [C:\Users\Mateo\AppData\Roa  
ming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport.vcx  
proj]  
gyp ERR! build error  
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1  
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\build.js:270:23)  
gyp ERR! stack at emitTwo (events.js:87:13)  
gyp ERR! stack at ChildProcess.emit (events.js:172:7)  
gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:200:12)  
gyp ERR! System Windows\_NT 10.0.10240  
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node" "--module\_name=serialport" "--module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64"  
gyp ERR! cwd C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport  
gyp ERR! node -v v5.0.0  
gyp ERR! node-gyp -v v3.0.3  
gyp ERR! not ok  
node-pre-gyp ERR! build error  
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64' (1)  
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Mateo\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 emitTwo (events.js:87:13)  
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)  
node-pre-gyp ERR! stack at maybeClose (internal/child\_process.js:818:16)  
node-pre-gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:211:5)  
node-pre-gyp ERR! System Windows\_NT 10.0.10240  
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Mateo\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\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport  
node-pre-gyp ERR! node -v v5.0.0  
node-pre-gyp ERR! node-pre-gyp -v v0.6.13  
node-pre-gyp ERR! not ok  
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64\serialport.node --module\_name=serialport --module\_path=C:\Users\Mateo\AppData\Roaming\npm\node\_modules\particle-cli\node\_modules\serialport\build\serialport\v2.0.2\Release\node-v47-win32-x64' (1)  
npm WARN install:serialport serialport@2.0.2 install: `node-pre-gyp install --fallback-to-build`  
npm WARN install:serialport Exit status 1  
C:\Users\Mateo\AppData\Roaming\npm  
└── (empty)

npm ERR! code 1
