The connection is established and the app runs just fine.
All I can tell is that I am very confused, lost, mad, frustrated. I cannot explain why only Desktop has this behavior. For now, I have no expectations to use Desktop despite I consider it a great tool for developers, it doesn't work for me (if I want to connect the local database to my app).
It may be a silly suggestion, but I've had trouble sometimes because of my anti-virus and firewall software, but I couldn't connect to a server instance, but could to Desktop. Have you tried turning them off?
Port 7474 is only used for hosting HTTP for either loading the Neo4j Browser app, or sending REST. The Neo4j drivers use the "Bolt" port, which by default is 7687.
Try the using port 7687 in your .env to see if that helps.
Naive question: Can you connect to Neo4J URL (with a port number) using a regular browser? If that doesn't work, then I presume the issue has nothing to do with JavaScript.
Yes, @clem, I can connect my local Neo4j database to Neo4j Browser in Chrome or Edge smoothly, nice and easy. The next thing I will investigate is to turn Kaspersky AV off and try to connect to the local database.
Javascript issue was eliminated as soon as I managed to connect to a sandbox instance.