Why is sudo needed in terminal? Should terminal token match build.spark.io?

  1. When I enter "spark cloud login" into terminal I get this error unless I use "sudo spark cloud login" Is there a way to avoid the error without using sudo? Is sudo required
    because it's changing local config files in my Mac's system or is it needs for some other reason?:
There was an error reading undefined:  { [Error: EACCES, permission denied '/Users/myname/.spark/spark.config.json']
errno: -13,
code: 'EACCES',
path: '/Users/myname/.spark/spark.config.json',
syscall: 'open' }
 **Could I please have an email address?** 
  1. Is the token listed in terminal after I login supposed to be the same as the one in build.spark.io under settings? (It's not for me.)

@futurebird,

the access token for the Web IDE and Spark-cli are using 2 different ones. What’s your convern about this?

I don’t have to use sudo on my mac for Spark-cli. How did you install it?

I had to use sudo for the install too.

Yup that’s needed as you need to install the npm module globally using sudo npm install -g spark-cli

After that, the command should work simply using spark xxx

Seem to have solved my problem although I still don’t understand why this was happening. I ran

sudo chown myname /Users/myname/.spark/spark.config.json

and now everything is working fine. I wonder how the permissions got messed up? Thanks for the clarification about the tokens. By the way, if I want to check on a variable using terminal do I need to use the Spark.variable command? Right now “spark get” says my core has not variables. (but it’s sending data so It must…)

1 Like

Yes spark list will show the functions and variables you declared in your user firmware.

If you did not use it, there’s nothing registered with the :cloud: so it’s empty.

Have fun!! :smiley:

1 Like