0

I am upgrading casper from version 1.0.2 to 1.1.3. I also upgraded phantom 1.9.7 to 2.1.1. My code was working fine with version 1.0.2, but as soon as I upgraded it to higher version, I am getting two error:

  • CasperError: Can't find module ./lib/extended
  • phantomjs://code/bootstrap.js:297 in patchedRequire

On this line:

var casper = require('./lib/extended').create ()

I've tried this approach, but it didn't worked.

DrakaSAN
  • 7,673
  • 7
  • 52
  • 94
NASH
  • 81
  • 1
  • 7
  • `require('./extended')` in casper 1.1.13 throw a error, but it worked on 1.0.2, anybody used casper and can help me?" – NASH Sep 15 '16 at 09:59
  • Somebody reinstalled CasperJS (and maybe PhantomJS too) and it started to work again. Try to do a clean install. Also, how are you installing it? – Artjom B. Sep 15 '16 at 17:04
  • i am using binary, and through changing environmental variable in windows. Many at time i change version, but i have to restart my machine to see the updated version bu phantomjs -v or casperjs --v. But this is something with phantom lib, defining the path. is there any way changing casper path by initiating phantom object in my JS. – NASH Sep 16 '16 at 04:06
  • Yes, you can load CasperJS into PhantomJS: http://stackoverflow.com/a/13102134/1816580 – Artjom B. Sep 16 '16 at 05:19

0 Answers0