httpd.js syntax error on mac

22 views
Skip to first unread message

bryan rasmussen

unread,
Mar 24, 2013, 8:57:12 AM3/24/13
to js...@googlegroups.com
Hi,

I am trying to port a an application over to mac that I haven't worked
with in a long time (the app) anyway have been getting lots of syntax
errors which I thought were related to windows linefeeds but I changed
over to Mac line endings and that didn't work, I finally had to remove
all line feeds in my code and then things were working.

Anyway one problematic file is httpd.js which I depend on. I
downloaded the mac version of jsdb but when I open httpd.js in my
editor, sublimetext it says the line endings are Windows. If I change
to mac line endings and save and run it with
./jsdb httpd.js I get
-bash:./jsdb httpd.js
httpd.js:556 )
httpd.js:556 ^
httpd.js:556 SyntaxError: syntax error
Execution error in httpd.js.

I am supposing I can't just get rid of all linefeed characters in here
as that would anyway break the script, but I am wondering if anyone
knows what and why this is broken=?

Thanks,
Bryan Rasmussen

Shanti Rao

unread,
Mar 25, 2013, 12:08:24 PM3/25/13
to js...@googlegroups.com
Hi Bryan,

It's a linefeed thing. I don't know why -- JSDB is supposed to convert
\r\n to \n on any platform.

Save it with Unix (not Mac) linefeeds, and it'll work. Sorry about that.

Shanti
Reply all
Reply to author
Forward
0 new messages