All,
Have a naive looking problem: I have an application (react/viteJS) compiled in node16 and we run the app on https using mkcert on local machines. The app runs just fine. Now comes the udpate part. We udpated our app to nodeJS version 20 (and corresponding packages) and we keep getting this
This site can’t be reached admin.localhost.com refused to connect.
In the host files, we have the below
127.0.0.1 portal.localhost.com
127.0.0.1 admin.localhost.com
Again, this all works when switched to nodeJS 16.
2
Answers
Turns out the issue was with the vite.js configuration. For some reason, it specifically needed host to be set to "localhost.com" and surprisingly worked with with node16!
Node v20 prefers
ipv6
overipv4
addresses. You can try adding theipv6
address into youhosts
file: