speclj
speclj copied to clipboard
PhantomJS 2.0.0: TypeError: undefined is not an object (evaluating 'phantom.args[0]')
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.
+1
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]);
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