跳到主要内容
CNode

casperjs 的安装问题

社区
Iiln168发布于 12 年前最后回复 12 年前
591470

按官方教程安装了casperjs,但在使用时提示模块不存在:

********\phantomjs>phantomjs app.js
Error: Cannot find module 'casper'

app.js 中的代码如下:

var casper = require('casper');

哪位大侠知道这是什么回事。
安装 casperjs 过程如下: 从官方下载 并把文件放在 C:\node\casperjs 目录中,并配置Path环境变量 C:\node\casperjs\bin;

查看回复

回复 (5)

I
iln168#512 年前

有谁知道

I
iln168#412 年前

有人知道吗

I
iln168#312 年前

哪位大湿知道这早什么情况

I
iln168#212 年前

官方给的教程如下:

CasperJS on Windows Phantomjs installation additions

Append ;C:\phantomjs to your PATH environment variable. Modify this path appropriately if you installed PhantomJS to a different location.

Casperjs installation additions

New in version 1.1-beta3.

Append ;C:\casperjs\bin to your PATH environment variable. Modify this path appropriately if you installed CasperJS to a different location.

You can now run any regular casper scripts that way:

C:> casperjs myscript.js

Colorized output

Note

New in version 1.1-beta1.

Windows users will get colorized output if ansicon is installed.

I
iln168#112 年前

我的系统是windows 8的

参与回复

登录后即可参与回复。登录