fouber / pmui

An UI wrapper of page-monitor, to show webpage history captures and diff them.
147 stars 17 forks source link

I have a problem,please help me , thx! #2

Open lllliuliu opened 9 years ago

lllliuliu commented 9 years ago

when i run ' node www.google.com.js', result:

[root@localhost page-monitor]# [DEBUG] cli arguments: ["--max-disk-cache-size=0","--disk-cache=false","--ignore-ssl-errors=yes"]

child_process.js:946 var r = this._handle.spawn(options); ^ TypeError: Bad argument at ChildProcess.spawn (child_process.js:946:24) at exports.spawn (child_process.js:746:9) at Monitor._phantom (/test/phantomjs/page-monitor/node_modules/page-monitor/index.js:419:16) at Monitor.capture (/test/phantomjs/page-monitor/node_modules/page-monitor/index.js:357:17) at Object. (/test/phantomjs/page-monitor/www.7230.com.js:12:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)

What Happened?

system is centos6.5 npm and node.js is yum install phantomjs is make install

fouber commented 9 years ago

@lllliuliu

lllliuliu commented 9 years ago

感谢@fouber回答。 额,我英文比较挫,可以说中文么,忽然发现作者是中国人

lllliuliu commented 9 years ago

phantomjs version is 2.0.1-development nodejs version is v0.10.36 www.google.com.js content is :

var Monitor = require('page-monitor');
var url = 'http://myself-url/';
var opt = { /* see https://github.com/fouber/page-monitor#monitor */ };
var monitor = new Monitor(url, opt);
monitor.on('debug', function (data) {
    console.log('[DEBUG] ' + data);
});
monitor.on('error', function (data) {
    console.error('[ERROR] ' + data);
});

monitor.capture(function (code) {
    console.log('[DONE ] ' + (new Date));
});