Spark-cli install

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)

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

@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]

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?

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

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.

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