If the version of Node is: * < 5, use `phantom@2` * 5, use `phantom@3` * 6+, use latest version [Reference to `phantomjs.node` docs](https://github.com/amir20/phantomjs-node#installation) Maybe use [`engine-dependencies`](https://www.npmjs.com/package/engine-dependencies) package to achieve this.