javascript - TypeError: 'undefined' is not an object (evaluating 'requireDirs.forEach') -
so, transitioning code windows linux today make sure works. managed break casper/phantom , i'm not sure how.
here's command runs casper script on linux (ubuntu 12.14):
/usr/bin/casperjs /var/www/tekalyze/phantom/get_site_info.js --jquery-path="/var/www/tekalyze/js/jquery-1.10.2.min.js" --uri-path=" /var/www/tekalyze/phantom/uri.js" --log-path="/var/www/tekalyze/phantom/casper.log" --data-url=http://tekalyze.com/ajax.php --id='19' --url='http://www.bk.com/?utm_source=locationiq&utm_medium=locallstgs&utm_campaign=2013' --log-level=debug it's giving me this:
typeerror: 'undefined' not object (evaluating 'requiredirs.foreach') in module (./get_all_urls:102) /var/www/tekalyze/phantom/get_all_urls.js:102 in _require /var/www/tekalyze/phantom:13 in anonymous /home/casper/casperjs/bin/bootstrap.js:146 in _require /var/www/tekalyze/phantom/get_site_info.js:8 /var/www/tekalyze/phantom/get_site_info.js:228 line 102 of get_all_urls is:
crawl.call(this, links[currentlink]); i've tried commenting out, , stack trace remains same, leads me believe it's not related.
the relevant file can found here.
i'm scratching head. looked @ bootstrap.js:146 , saw phantom.casperpath, hadn't had set environment variable in windows, i'm not sure linux. relevant line this: if (!phantom.casperpath) -- leads me believe work if re-write start phantom first, set of casper variables, haven't verified whether or not work yet.
also, used this script install them both, directories should set correctly.
it turns out functionality isn't added until 1.1.0-dev, updating instead of using 1.0.0 on linux best solution.
Comments
Post a Comment