Open no2chem opened 1 year ago
I'd suggest adding these node versions to the CI in tests-sandbox.yml
to assert this feature
@idea404 done
@volovyks I don't have permissions either, let me ask Arthur
Please can this be merged and released, I spent a long time getting stuck and this looks like it's the solution. I'm sure there are many others using Mac and LTS node
@robdefeo for some reason I can not run CI here. Created a separate PR to test Node 18, but faced a dependencie issue that is not fixed here aswell. https://github.com/near/workspaces-js/pull/208
Error:
eslint-import-resolver-webpack@0.13.1: The engine "node" is incompatible with this module. Expected version "^16 || ^15 || ^14 || ^13 || ^12 || ^11 || ^10 || ^9 || ^8 || ^7 || ^6". Got "18.7.0"
error Found incompatible module.
Do you have the same issue?
Not sure of the exact cause though I'd suggest upgrading the version of xo
. In package json is a bit old "^0.44.0"
where as the current version which appears circa 2 years old. Version [0.53.1](https://www.npmjs.com/package/xo/v/0.53.1)
is the latest which may have some updates. If this doesn't work then it warrants a further look.
Hey @no2chem ! Looks like we fixed the CI, can you please merge current "main" to your branch?
hi @volovyks - sorry for the delay. rebased and pushed.
all tests are passing, the change is clear, this LGTM @fospring
This PR fixes an issue in Node 18+ which causes tests to never launch.
The root cause is in https://github.com/nodejs/node/issues/40702 - essentially localhost is ambiguously defined as both
127.0.0.1
and::1
. Node 16 forced127.0.0.1
, whereas node 18+ just uses whatever the OS gives back as a result ofgetaddrinfo(3)
-- on macOS it happens to be::1
-- but the near sandbox is set to explicitly listen on ipv4 (0.0.0.0:random port).So, this PR fixes the issue by forcing 127.0.0.1 instead of localhost for the sandbox RPC.
This PR closes #168