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

Testcafe doesn't work with node 18.0 #7000

Closed
mecciau opened this issue Apr 28, 2022 · 4 comments
Closed

Testcafe doesn't work with node 18.0 #7000

mecciau opened this issue Apr 28, 2022 · 4 comments
Labels
TYPE: bug The described behavior is considered as wrong (bug).

Comments

@mecciau
Copy link

mecciau commented Apr 28, 2022

What is your Scenario?

Fresh install of testcafe 1.18.6
trying to run a simple test with npx testcafe

fixture`Getting Started`.page`https://devexpress.github.io/testcafe/example`;

test('My first test', async t => {
    console.log('all good')
});

What is the Current behavior?

% npx testcafe 

ERROR TypeError: details.family.toLowerCase is not a function
    at /Users/dominykasverkauskas/src/hello/node_modules/ip/lib/ip.js:385:39
    at Array.filter (<anonymous>)
    at /Users/dominykasverkauskas/src/hello/node_modules/ip/lib/ip.js:384:37
    at Array.map (<anonymous>)
    at ip.address (/Users/dominykasverkauskas/src/hello/node_modules/ip/lib/ip.js:379:37)
    at Proxy.getIPAddress (/Users/dominykasverkauskas/Shopify/hello/node_modules/endpoint-utils/index.js:109:15)
    at getValidHostname (/Users/dominykasverkauskas/hello/node_modules/testcafe/lib/index.js:26:34)
    at Object.createTestCafe [as default] (/Users/dominykasverkauskas/src/github.com/node_modules/testcafe/lib/index.js:71:9)
    at async runTests (/Users/dominykasverkauskas/src/hello/node_modules/testcafe/lib/cli/cli.js:63:22)
    at async cli (/Users/dominykasverkauskas/src/hello/node_modules/testcafe/lib/cli/cli.js:136:13)

Type "testcafe -h" for help.

What is the Expected behavior?

To start running the test

What is your public website URL? (or attach your complete example)

https://devexpress.github.io/testcafe/example

What is your TestCafe test code?

spec file:

fixture`Getting Started`.page`https://devexpress.github.io/testcafe/example`;

test('My first test', async t => {
    console.log('all good')
});

Your complete configuration file

module.exports = {
    browsers: 'chrome',
    src: "./tests"
}

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. use node 18.0.0
  2. fresh install testcafe
  3. run any test

TestCafe version

1.18.6

Node.js version

18.0.0

Command-line arguments

testcafe chrome -e test.js

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

@mecciau mecciau added the TYPE: bug The described behavior is considered as wrong (bug). label Apr 28, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 28, 2022
@miherlosev
Copy link
Collaborator

Hi @mecciau

This error is caused by a breaking change in Node.js 18, which broke a lot of popular modules.
See these threads:

This issue will be fixed in the latest version of Node.js or related modules.

@need-response-app need-response-app bot added STATE: Need response An issue that requires a response or attention from the team. and removed STATE: Need response An issue that requires a response or attention from the team. labels Apr 29, 2022
@megaandros
Copy link

The issue can be fixed with node.js = v.17.9.0
How to downgrade - https://stackoverflow.com/questions/58280757/how-to-upgrade-node-to-specific-version-in-macos-mojave-and-update-the-active-p

@AlexKamaev AlexKamaev removed the STATE: Need response An issue that requires a response or attention from the team. label May 3, 2022
@ND3V
Copy link

ND3V commented Jun 10, 2022

A note on this: starting tests via the VSCode plugin "Testcafe Test Runner" does work,
so one might find a way around this.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jun 10, 2022
@Aleksey28
Copy link
Collaborator

Hi @ND3V ,

I can no longer reproduce this problem via CLI either.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

6 participants