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

Scala.js: Support running tests in Node 17 #1664

Closed
davesmith00000 opened this issue Jan 11, 2022 · 1 comment · Fixed by #1668
Closed

Scala.js: Support running tests in Node 17 #1664

davesmith00000 opened this issue Jan 11, 2022 · 1 comment · Fixed by #1668
Milestone

Comments

@davesmith00000
Copy link
Contributor

Node 17 prevented Scala.js versions prior to 1.8.0 from running tests in sbt without a workaround or adding a support library. This was fixed in Scala.js 1.8.0 (presumably in the sbt plugin).

Details of the issue are here: scala-js/scala-js-js-envs#12

Under Mill, using Scala.js 1.8.0 does not resolve the problem, and the following workaround is required:

  object test extends Tests {
    ...
    override def jsEnvConfig = T(JsEnvConfig.NodeJs(args = List("--dns-result-order=ipv4first")))
  }

Otherwise you see an error similar to:

Scala.js Com failed: Error: connect ECONNREFUSED

@davesmith00000
Copy link
Contributor Author

Excellent! Thanks all! 😄

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 a pull request may close this issue.

2 participants