无法让Casperjs在Mac OSX上工作[英] cant get CasperJS to work on Mac OSX

问题描述

尝试了几乎所有内容,最终删除了所有NPM&Node(和节点模块)并再次安装.相同的结果:

CasperError: Can't find module fs

phantomjs://code/bootstrap.js:297 in patchedRequire
phantomjs://platform/colorizer.js:35
CasperError: Can't find module fs

phantomjs://code/bootstrap.js:297 in patchedRequire
phantomjs://platform/casper.js:36
TypeError: undefined is not a constructor (evaluating 'require('casper').create()')

 phantomjs://code/cloner.js:1 in global code
:0 in injectJs
phantomjs://code/bootstrap.js:435

它甚至仅通过放置

就会发生
 var casper = require("casper").create();

有什么想法?

(MacBook Air OSX El Capitan 10.11.6)

推荐答案

您是:var fs = require('fs');?

casperjs和phamtomjs是否在全球安装?

本文地址:https://www.itbaoku.cn/post/1740139.html