Closed GoogleCodeExporter closed 9 years ago
You forgot the opening " in the string literal.
Original comment by dim...@google.com
on 28 Apr 2014 at 4:55
Thanks for comment. I did'n know this.
Does it have to specify with Quote(") to write shebang in JS script file ?
(Invalid)
#!/usr/bin/env node
(Valid)
"#!/usr/bin/env node"
Original comment by logyours...@gmail.com
on 28 Apr 2014 at 5:01
Hmm.. after wrapping it with the quota, it doesn't work properly..
When it has shebang in the first line on JS file, it works although not
specifying node.
./test.js ( O )
this works fine like "node ./test.js"
But after wrapping it with quote, it does not work properly.
./test.js (X)
line 1: #!/usr/bin/env node: No such file or directory
Original comment by logyours...@gmail.com
on 28 Apr 2014 at 5:06
It looks shebang(#!) line should not start with " (Quote)
Please let me know if I was wrong.. :-( , please..
Original comment by logyours...@gmail.com
on 28 Apr 2014 at 5:12
Please find the attached one.
java -jar compiler.jar --language_in ECMASCRIPT5 --js ./test.js
./test.js:1: ERROR - Parse error. primary expression expected
#!/usr/bin/env node
^
1 error(s), 0 warning(s)
Original comment by logyours...@gmail.com
on 28 Apr 2014 at 5:22
"Contents of test.js"
#!/usr/bin/env node
var test = "normal ?"
console.log("Is this", test);
Original comment by logyours...@gmail.com
on 28 Apr 2014 at 5:24
Attachments:
#!/usr/bin/env node
is not valid JavaScript, that's why you're getting a parse error.
Original comment by dim...@google.com
on 28 Apr 2014 at 5:24
i've re-filed this as
https://github.com/google/closure-compiler/issues/410
I think we should do this.
Original comment by Nicholas.J.Santos
on 8 May 2014 at 1:22
Original issue reported on code.google.com by
logyours...@gmail.com
on 28 Apr 2014 at 2:48