# Spark-cli install

**URL:** https://community.particle.io/t/spark-cli-install/7467
**Category:** General
**Created:** [October 14, 2014, 3:52pm UTC](https://community.particle.io/t/spark-cli-install/7467 "2014-10-14T15:52:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![gdillen](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gdillen](https://community.particle.io/u/gdillen)
#### Post date: [October 14, 2014, 3:52pm UTC](https://community.particle.io/t/spark-cli-install/7467/1 "2014-10-14T15:52:25Z")

</div>

Hi,

Trying to install spark-cli on my Mac.

I get the following warnings (I don’t have a local folder ~/.node-gyp/0.10.32)

## $ sudo npm install -g spark-cli $ Password:

```
> serialport@1.4.5 install /usr/local/lib/node_modules/spark-cli/node_modules/serialport
> node-pre-gyp install --fallback-to-build

**gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/xyz/.node-gyp/0.10.32"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/spark-cli/node_modules/serialport/.node-gyp"**
  CXX(target) Release/obj.target/serialport/src/serialport.o
  CXX(target) Release/obj.target/serialport/src/serialport_unix.o
  CXX(target) Release/obj.target/serialport/src/serialport_poller.o
  SOLINK_MODULE(target) Release/serialport.node
  SOLINK_MODULE(target) Release/serialport.node: Finished
  COPY /usr/local/lib/node_modules/spark-cli/node_modules/serialport/build/serialport/v1.4.5/Release/node-v11-darwin-x64/serialport.node
  TOUCH Release/obj.target/action_after_build.stamp
/usr/local/bin/spark -> /usr/local/lib/node_modules/spark-cli/bin/spark.js
spark-cli@0.4.1 /usr/local/lib/node_modules/spark-cli
├── xtend@4.0.0
├── when@3.5.0
├── request@2.45.0 (caseless@0.6.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, oauth-sign@0.4.0, stringstream@0.0.4, tunnel-agent@0.4.0, node-uuid@1.4.1, qs@1.2.2, mime-types@1.0.2, form-data@0.1.4, bl@0.9.3, tough-cookie@0.12.1, http-signature@0.10.0, hawk@1.1.1)`indent preformatted text by 4 spaces`
├── hogan.js@2.0.0
├── moment@2.8.3
└── serialport@1.4.5 (bindings@1.2.1, sf@0.1.7, async@0.9.0, nan@1.3.0, optimist@0.6.1)
```

---

<div class="post-metadata">

### Author: ![juano2310](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/juano2310/32/20727_2.png) [@juano2310](https://community.particle.io/u/juano2310)
#### Post date: [October 14, 2014, 4:23pm UTC](https://community.particle.io/t/spark-cli-install/7467/2 "2014-10-14T16:23:19Z")

</div>

Hi @gdillen,  
That looks good. Does it work?

---

<div class="post-metadata">

### Author: ![gdillen](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gdillen](https://community.particle.io/u/gdillen)
#### Post date: [October 14, 2014, 6:55pm UTC](https://community.particle.io/t/spark-cli-install/7467/3 "2014-10-14T18:55:53Z")

</div>

@juano2310 I didn’t try it yet, I thought since I’m getting these warnings “WARN EACCES” it didn’t install as it should be? Bu as I mentioned I don’t have any local .node-gyp folder. Where does this .node-gyp folder come from?  
Thanks.

Update: I tried it, although I can login, there’s an error

$ spark cloud login  
There was an error reading undefined: [SyntaxError: Unexpected end of input]

---

<div class="post-metadata">

### Author: ![juano2310](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/juano2310/32/20727_2.png) [@juano2310](https://community.particle.io/u/juano2310)
#### Post date: [October 14, 2014, 7:12pm UTC](https://community.particle.io/t/spark-cli-install/7467/4 "2014-10-14T19:12:09Z")

</div>

The warning indicates that it doesn’t have permission to install but it tries a different option and it did work.

What happen if you try spark help or spark setup?

---

<div class="post-metadata">

### Author: ![gdillen](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gdillen](https://community.particle.io/u/gdillen)
#### Post date: [October 14, 2014, 7:40pm UTC](https://community.particle.io/t/spark-cli-install/7467/5 "2014-10-14T19:40:18Z")

</div>

@juano2310 works perfect  
eg spark help  
Welcome to the Spark Command line utility!

> **[particle-iot/spark-cli](https://github.com/particle-iot/spark-cli)**
>
> spark-cli - DEPRECATED: Renamed to particle-cli. See https://github.com/spark/particle-cli

Usage: spark \<command\_name\>   
Common Commands:

_The warning indicates that it doesn’t have permission to install but it tries a different option and it did work._  
Probably if I install (instead of “sudo”) as “root” user it won’t give a warning.  
Thanks.

---

<div class="post-metadata">

### Author: ![gdillen](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gdillen](https://community.particle.io/u/gdillen)
#### Post date: [March 14, 2015, 10:54am UTC](https://community.particle.io/t/spark-cli-install/7467/6 "2015-03-14T10:54:55Z")

</div>

When performing:  
$ npm list -g I get:

npm ERR! invalid: node-pre-gyp@0.5.19 /usr/local/lib/node\_modules/spark-cli/node\_modules/serialport/node\_modules/node-pre-gyp  
npm ERR! invalid: readable-stream@1.0.27-1 /usr/local/lib/node\_modules/spark-cli/node\_modules/serialport/node\_modules/node-pre-gyp/node\_modules/tar-pack/node\_modules/readable-stream  
npm ERR! invalid: string\_decoder@0.10.25-1 /usr/local/lib/node\_modules/spark-cli/node\_modules/serialport/node\_modules/node-pre-gyp/node\_modules/tar-pack/node\_modules/readable-stream/node\_modules/string\_decoder

Can I just ignore these messages?

"The warning indicates that it doesn’t have permission to install but it tries a different option and it did work."  
What is the way to avoid the “warnings” and have a “correct” installation?

Thanks.  
Guy
