-
Notifications
You must be signed in to change notification settings - Fork 4
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 Com failed: ECONNREFUSED' for Com runs with Node.js 17 #12
Comments
Found it. It is an instance of the upstream issue nodejs/node#40537, which is a consequence of an intended change of behavior nodejs/node#39987. The JVM server for the Com runs on IPv4, but Node.js now tries to connect to it via IPv6. WorkaroundAs a workaround, pass the new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))) For example, in an sbt build, that would be in a setting like import org.scalajs.jsenv.nodejs.NodeJSEnv
jsEnv := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first"))) |
Fix #12: Force the server and client of Node.js Com to use IPv4.
New workaround until Scala.js v1.8.0We have now published scalajs-env-nodejs v1.2.1, which contains a proper fix to this issue. It will be included in Scala.js 1.8.0, but that is not for tomorrow. In the meantime, you may force scalajs-env-nodejs v1.2.1 to be used, even with older Scala.js versions, with the following setting in libraryDependencies += "org.scala-js" %% "scalajs-env-nodejs" % "1.2.1" |
This is needed to fix this issue scala-js/scala-js-js-envs#12 that is fixed in the latest version of `scalajs-env-nodejs` To share the version between build and meta-build I created a Scala file which I then syslinked to project/project/ by doing: ``` cd project/project ln -s ../MetaBuildShared.scala ```
The CI image was updated and we're hitting scala-js/scala-js-js-envs#12 on 1.4.0.
Required to fix scala-js/scala-js-js-envs#12 in CI.
In order to avoid scala-js/scala-js-js-envs#12.
It seems that our Com setup for the Node.js env is completely broken on Node.js 17. The symptom in a Scala.js application is
The test suite of this repo indeed fails on Node.js 17.0.1, whereas it passes on 16.13.0:
This issue makes any
test
task in a Scala.js project completely unusable.The text was updated successfully, but these errors were encountered: