Web scraping with CasperJS returns strange error that isn't documented

Okay guys I have an answer for you - the 'fs' is a module bundled with node, so it doesn't have to be installed through npm. The package you downloaded is this: https://www.npmjs.com/package/fs and all it contains is...

console.log("I'm `fs` modules");

When you did:

npm uninstall fs

npm install -g fs

The node used its local package - that it shipped with - and ignored the global one entirely. Mystery solved. ;)


I had the same problem. My OS is window 7 but I don't think that OS is the problem.

This is what I did and it worked

  1. npm uninstall fs

  2. npm install -g fs

I don't know why this happened but it's fixed now.