admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Can't import wd #513

Open llostris opened 6 years ago

llostris commented 6 years ago

When I'm trying to import wd in a test the following errors occurs and the test fails to run:

    /Users/llostris/Code/react_app/node_modules/vargs/lib/vargs.js: arguments is a reserved word in strict mode (24:37)
        22 | //   }
        23 | //
      > 24 | exports.Constructor = function Vargs(arguments) {
           |                                      ^
        25 |     this.array = Array.prototype.slice.call(arguments);
        26 |     this.__defineGetter__('length', function () {
        27 |         if (this.callbackGiven()) {

My setup:

Npm version: 5.6.0 Node version: 8.1.0 "devDependencies": { "wd": "^1.5.0" },

It seems to be a problem with the vargs-0.1.0 dependency, is there a way to work around this?

andrespr commented 5 years ago

vargs pull requests have been ignored for a number of years. ultimately, wd should move to another vargs since it seems to no longer be maintained. @llostris i had the same problem and had to use https://www.npmjs.com/package/patch-package and modify vargs.js by changing arguments to args. :)