can you share how you’re filling the connection fields (especially connection string / service name format)? it would help narrow this down further.
error usually means the TCP connection was opened but then closed by the server or interrupted on the network side.
Since you mentioned your Node.js script only works when explicitly calling initOracleClient(), that may still be needed depending on how Oracle libraries are installed, but the current error suggests the connection is reaching the server and then being closed, which points more to configuration or network rather than the client library itself.