speclj icon indicating copy to clipboard operation
speclj copied to clipboard

PhantomJS 2.0.0: TypeError: undefined is not an object (evaluating 'phantom.args[0]')

Open macroexpanse opened this issue 10 years ago • 3 comments

I'm attempting to port some specs from clj to cljc and be able to run them on both platforms. While I am able to run them on the JVM with lein spec, I am unable to run the specs through either lein cljsbuild or the executable.

macroexpanse avatar Jul 27 '15 03:07 macroexpanse

+1

jstrength avatar Jul 31 '15 16:07 jstrength

The PhantomJS API documentations says you should use the args property on the system module as the former property on the phantom module has been deprecated.

So your code now should look like:

var system = require('system');
...
p.injectJs(system.args[1]);

eploko avatar Feb 03 '16 07:02 eploko

I got same problem as @taeverity.

And I tried @eploko code, got another error:

ClojureScript could not load :main, did you forget to specify :asset-path?ReferenceError: Can't find variable: goog

  about:blank:1 in global code
  :0 in write
ReferenceError: Can't find variable: speclj

  undefined:2
  :6

wind13 avatar Aug 24 '16 02:08 wind13