Giter Site home page Giter Site logo

Comments (10)

matthewmueller avatar matthewmueller commented on May 13, 2024

Oh, it could also be because I'm running 2.0.0:

$ phantomjs --version
2.0.0 (development)

from nightmare.

matthewmueller avatar matthewmueller commented on May 13, 2024

Yep, that was it. I guess it's a good heads up ;-)

Great project!

from nightmare.

reinpk avatar reinpk commented on May 13, 2024

ah, that is a good heads up, thanks!

from nightmare.

bprodoehl avatar bprodoehl commented on May 13, 2024

@reinpk What's the outlook on supporting PhantomJS 2.0.0? Do you have any idea how much effort would be involved, and how much the Phantom devs have actually been changing the interfaces? 1.9.7 does a pretty terrible job of rendering interactive D3.js, and my attempts at bridging the gap in my app between what D3 wants and what 1.9.7 supports haven't worked out so far. So far interactive D3.js looks great in PhantomJS 2.0.0.

from nightmare.

bprodoehl avatar bprodoehl commented on May 13, 2024

Sorry, I see the same error just running phantomjs-node examples, so I don't think this has anything to do with nightmare.

from nightmare.

reinpk avatar reinpk commented on May 13, 2024

ah, bummer, not sure i haven't had a chance to investigate 2.0.0 at all yet

from nightmare.

fernandopasik avatar fernandopasik commented on May 13, 2024

I'm having the same issue but with phantom 1.9.7, but I'm not running the examples

phantom stdout: TypeError: 'undefined' is not an object (evaluating 'x.options')

from nightmare.

mariodu avatar mariodu commented on May 13, 2024

My OS is MacOS 10.10,and phantomjs is 2.0.0 (development),has this problem,please fix it

from nightmare.

bprodoehl avatar bprodoehl commented on May 13, 2024

@mariodu The problem lies in a package that nightmare depends on. I have created a ticket under that project here: https://github.com/sgentle/phantomjs-node/issues/208

@fernandopasik are you sure the problem isn't in your code? I'm not finding "x.options" anywhere in nightmare or phantomjs-node.

from nightmare.

dtothefp avatar dtothefp commented on May 13, 2024

I've forked Node PhantomJS and hacked around with it to install the only "stable" version for Mac of Phantom 2.0.0 I could find:

Version I'm using: https://github.com/eugene1g/phantomjs/releases/download/2.0.0-bin/phantomjs-2.0.0-macosx.zip
Fork: https://github.com/dtothefp/phantomjs

So, you could just require the binary path

var phantomPath = require('phantomjs').path
var nightmareOptions = {
  path: phantomPath.substring(0, phantomPath.lastIndexOf('/') + 1),
}

@bprodoehl it looks like you have shimmed the phantomjs-node package and the binary works fine with it. I just tried using the binary with Nightmare and it seems to work fine.

Also, I saw in your PR that the previous phantom.args are defined on system.args. Is this the syntax moving forward with PhantomJS 2.0.0?

from nightmare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.