Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting more information from “SyntaxError: Parse error” message in PhantomJS/CasperJS

I have a long CasperJS script. When I run it I get:

phantomjs file.js    
SyntaxError: Parse error

Is there a way to get some more information about the error. At least a line number? or any hint at all?

like image 380
Anuj Gupta Avatar asked Mar 04 '26 11:03

Anuj Gupta


1 Answers

Try run the file.js with node, so for your example:

node file.js
like image 140
Tony Avatar answered Mar 06 '26 01:03

Tony



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!