Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lllliuliu opened this issue Sep 16, 2015 · 3 comments
Open

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

lllliuliu opened this issue Sep 16, 2015 · 3 comments

Comments

@lllliuliu
Copy link

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
Copy link
Owner

fouber commented Sep 16, 2015

@lllliuliu

  • what's the nodejs version?
  • what's the phantomjs version?
  • what's the content of www.google.com.js?

@lllliuliu
Copy link
Author

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

@lllliuliu
Copy link
Author

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));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants