Unhandled Rejection (Neo4jerror) while connecting with react js

I am getting below error when I am trying to access neo4j db from other machine.
I am trying to access it through react js application.

neo4j connection Error :
Unhandled rejection neo4jerror : Could not perform discovery. No routing servers available. Known routing table[database =default database, expirationTime=0,currentTime=1601361720620,routers=, readers=, writers=]

Bolt connection Error :
Unhandled rejection neo4jerror : websocket
connection failure. Due to security constraints in your web browser, the reason for tge failure is not available to this Neo4j Driver. Please use your browsers development console to determine tge root cause of failure.

I have updated neo4j config files as follows :
dbms.connector.http.listen_address=machineip. 7474

dbms.connector.bolt.listen_address=machineip. 7687

Below is line of connection in react application:

neo4j. driver('neo4j:othermachineip:7474' ,neo4j. auth. basic('username', 'password'))

Tried bolt connection also :
neo4j. driver('bolt:othermachineip:7687' ,neo4j. auth. basic('username', 'password'))

I am new to neo4j,
Please suggest what can be done in above case.