BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

TypeError: undefined is not a function (evaluating 'fs.absolute(require('system').args[3])')

Open johannesjo opened this issue 10 years ago • 5 comments

I just did the following (running node v5.11.1):

backstop genConfig # seems to be successfull

And I'll get the followinging error:

$ backstop reference

BackstopJS CWD:  /home/folder/www/project
BackstopJS loading config:  /home/folder/www/project/backstop.json 

COMMAND | Executing core for `reference`
  clean | bitmaps_reference was cleaned.

Running CasperJS with:  [ '/home/folder/npm/lib/node_modules/backstopjs/capture/genBitmaps.js' ]
CasperJS:  I'm `fs` modules
CasperJS:  TypeError: undefined is not a function (evaluating 'fs.absolute(require('system').args[3])')
CasperJS: 
CasperJS:    phantomjs://code/genBitmaps.js:5 in global code
CasperJS:   :0 in injectJs
CasperJS:   phantomjs://code/bootstrap.js:435

johannesjo avatar Nov 02 '16 22:11 johannesjo

If you are getting a missing fs method I am guessing its the node version -- could you maybe try a different version?

garris avatar Nov 02 '16 22:11 garris

Same error with 7.0.0 and 6.9.1. I'm on Ubuntu 16.10.

johannesjo avatar Nov 02 '16 23:11 johannesjo

These are the versions we test for...

  • "0.12"
  • "4"
  • "5"
  • "6"

garris avatar Nov 02 '16 23:11 garris

I'm on my phone -- but if I was at a laptop I'd google for fs.absolute() and see what I could find.

garris avatar Nov 02 '16 23:11 garris

I had the same issue on Mac OSX 10.11 with different node versions. Removing local fake fs did the trick:

https://github.com/casperjs/casperjs/issues/1608#issuecomment-223821760

joschka avatar Nov 08 '16 15:11 joschka