我试图在我拥有的javascript文件上运行CasperJS,当我运行时
> casperjs index.js
Run Code Online (Sandbox Code Playgroud)
它说
'CasperError: Cant find module fs'.
Run Code Online (Sandbox Code Playgroud)
index.js的第一行是
var fs = require('fs');
Run Code Online (Sandbox Code Playgroud)
我安装了node,casperjs和phantomjs,为什么不能找到fs?如果我是对的,fs是Node的文件系统吗?
更新:我将nodejs添加到我的$ PATH,但仍然没有运气.