garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.7k stars 604 forks source link

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

Open johannesjo opened 7 years ago

johannesjo commented 7 years ago

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
garris commented 7 years ago

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

johannesjo commented 7 years ago

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

garris commented 7 years ago

These are the versions we test for...

garris commented 7 years ago

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

joschka commented 7 years ago

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