Skip to content

fix(travis): Run tests with Node 10 instead of 8#238

Merged
Rob--W merged 3 commits intomozilla:masterfrom
Rob--W:chromedriver-ci-fix
Sep 17, 2020
Merged

fix(travis): Run tests with Node 10 instead of 8#238
Rob--W merged 3 commits intomozilla:masterfrom
Rob--W:chromedriver-ci-fix

Conversation

@Rob--W
Copy link
Member

@Rob--W Rob--W commented Sep 17, 2020

CI is currently failing because package.json refers chromedriver ^80.0.1, which also matches 80.0.2.

In 80.0.2, chromedriver updated the extract-zip dependency:
giggio/node-chromedriver@16151de

extract-zip 2.0.0 has dropped support for Node <10, e.g. by using APIs that were introduced in Node 10:
https://github.com/maxogden/extract-zip/blob/v2.0.0/index.js#L11

which triggers the following error when run on earlier versions of Node:

> chromedriver@80.0.2 install /home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver
> node install.js

internal/util.js:214
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:214:11)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver/install.js:14:20)

This commit fixes the issue by running tests with Node 10.
Node 8 had become end-of-life on 2019-12-31 anyway.
(and node-chromedriver started to officially require Node 10 starting with 83.0.0, in giggio/node-chromedriver#263 )

@Rob--W
Copy link
Member Author

Rob--W commented Sep 17, 2020

Fun. CI keeps failing, now due to Firefox. I'll file a bug upstream.

@Rob--W Rob--W force-pushed the chromedriver-ci-fix branch from 0b9cb85 to c9e7d4d Compare September 17, 2020 10:59
CI is currently failing because package.json refers chromedriver
^80.0.1, which also matches 80.0.2.

In 80.0.2, chromedriver updated the `extract-zip` dependency:
giggio/node-chromedriver@16151de

extract-zip 2.0.0 has dropped support for Node <10, e.g. by using APIs
that were introduced in Node 10:
https://github.com/maxogden/extract-zip/blob/v2.0.0/index.js#L11

which triggers the following error when run on earlier versions of Node:

```
> chromedriver@80.0.2 install /home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver
> node install.js

internal/util.js:214
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:214:11)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver/install.js:14:20)
```

This commit fixes the issue by running tests with Node 10.
Node 8 had become end-of-life on 2019-12-31 anyway.
@Rob--W Rob--W requested a review from rpl September 17, 2020 11:20
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

Successfully merging this pull request may close these issues.

2 participants