sonoslack icon indicating copy to clipboard operation
sonoslack copied to clipboard

Followed the instruction but can't run the script. Am I missing something?

Open paulmiard opened this issue 10 years ago • 5 comments

I followed the instructions and getting ./index.iced: line 3: syntax error near unexpected token '(' ./index.iced: line 3: `sonos = require('sonos')'

if I try node index.iced I get if config.sonosIpAddress == "detect" ^^^^^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3


Might be due to the node version running it? 0.10.33

paulmiard avatar Apr 01 '15 20:04 paulmiard

Seems like it's trying to run the code as a bash script! Does running ./node_modules/.bin/iced index.iced work?

Your version of node is fine, same one I'm using at the moment.

ewiner avatar Apr 01 '15 20:04 ewiner

It works indeed! Thanks for the quick reply! What made you think that was the issue?

Now I just get an error the first time I run the script and it gets published in slack : Error: Error: Non-whitespace before first tag. Line: 0 Column: 1 Char: N

paulmiard avatar Apr 01 '15 20:04 paulmiard

Hmm... unfortunately that error is coming from the code in https://github.com/bencevans/node-sonos, but I'm not sure what's causing the problem and nothing similar is reported in that project.

What OS are you running, by the way?

ewiner avatar Apr 01 '15 21:04 ewiner

Oh ok. Well it's not a big deal it only happens when the script starts.. Running Mac OS 10.10.2 and bash 3.2.57 Thanks for the help!

paulmiard avatar Apr 02 '15 16:04 paulmiard

^ I have the same error show up every time I run the script. Was there ever any fix for this?

Running Mac OS 10.11.4 Beta

bryanelder avatar Mar 25 '16 15:03 bryanelder