phantomjs always giving parse error on windows

javascript, phantomjs

Solution

Add 'phantomjs-1.5.0-win32-static' folder path to your system environment variable `path` and try `phantomjs --version` in new cmd prompt. If you can able to get the version correctly then you can execute your .js as below

phantomjs hello.js

Problem

this might sound like a stupid issue but I can't seem to figure out at all why I downloaded the windows binary and following the quickstart instructions and tried using the examples, but whatever and whenever I type anything in the console I always get "parse error" I tried: ``` phantom hello.js phantomjs hello.js ``` and some of the example scripts, and I always get 'parse error' the hello.js file simply has this `console.log('Hello, world!');` `phantom.exit();` I have no clue what's wrong... any help would be appreciated...I'm sure this will turn out to be something stupid so I appreciate your time! thanks

Original source

Related problems