'Can't find module fs' when running casperjs on js file
I am trying to run CasperJS on a javascript file that I have, and when I run > casperjs index.js it says 'CasperError: Cant find module fs'. The first line of index.js is var fs = require('fs'); I have node, casperjs, and phantomjs installed, why can't it find fs? If I am correct, fs is Node's file system? UPDATE: I added nodejs to my $PATH, but still no luck. Did you install the PhantomJS/CasperJS modules as well as the node fs module in your project? They don't seem to mix very well. I ran into an issue where installed all of these modules and I was getting the same error message you