getting more information from phantomjs “SyntaxError: Parse error” message

前端 未结 7 2222
感动是毒
感动是毒 2020-12-03 04:38

I have a long script that was not written by me. When i run it I get:

phantomjs file.js
SyntaxError: Parse error

i checked out the manual a

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-03 05:01

    Your file.js contains an invalid syntax. You should check it with a syntax validator. An online tool which I have created can be one possible solution, check out http://esprima.org/demo/validate.html.

提交回复
热议问题