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

Passing dnodeOpts to disable the weak module #15

Open
ghost opened this issue Jan 6, 2016 · 4 comments
Open

Passing dnodeOpts to disable the weak module #15

ghost opened this issue Jan 6, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 6, 2016

im trying to disable the weak module with the following

var phantom = require('x-ray-phantom');
var x = require('x-ray')();

var options = {
    dnodeOpts: {
        weak: false
    }
};

x.driver(phantom(options));

I keep getting an

Error: Cannot find module 'weak'

I'm going to assume I'm passing the option incorrectly?

@asarosi
Copy link

asarosi commented Feb 26, 2016

Hello guys,

I'm facing the same issue, could somebody give us some advice?

@ghostfreak3000
Copy link

Faced the same problem.

Mine was a node-gyp issue on windows 10 so it was failing to build the weak package on npm install.

Switched to Linux and it all worked like a charm

@gustavotroisgarcia
Copy link

Hello,
the following options works for me on Windows 10.

var Xray = require('x-ray');
var x = Xray().driver(phantom({webSecurity: false, weak: false}));

x-ray-phantom calls Nightmare constructor that has default options, and weak is one of them.

function driver(options, fn) {
  if ('function' == typeof options) fn = options, options = {};
  options = options || {};
  fn = fn || phantom;
  var nightmare = new Nightmare(options);
/**
 * Default options.
 *
 * http://phantomjs.org/api/command-line.html
 */

var DEFAULTS = {
  timeout: 5000,
  interval: 50,
  weak: true,
  loadImages: true,
  ignoreSslErrors: true,
  sslProtocol: 'any',
  proxy: null,
  proxyType: null,
  proxyAuth: null,
  cookiesFile: null,
  webSecurity: true
};

@MichaelTSS
Copy link

@gustavotroisgarcia Thanks ! This solved my issue

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

4 participants