1. sid and service name are totally different thing
In short: SID = the unique name of your DB, ServiceName = the alias used when connecting
and, if you use an SID, you need to configure a tnsnames.ora file.
(sometimes, we cannot expect all ones who manage dbs can understand db well or can give perfect infomation) from doc of node-oracledb, it says that SID is an old-school style. so, you have to write a tnsnames.ora file to configure it.
2. sometimes enviroment varibles are not work well
click here, you will find where to put your tnsnames.ora file
and this is what you may set
export ORACLE_HOME="/usr/lib/oracle/18.5/client64" export TNS_ADMIN="/usr/lib/oracle/18.5/client64/network/admin" export PATH="$PATH:/usr/lib/oracle/18.5/client64/bin" export LD_LIBRARY_PATH="/usr/lib/oracle/18.5/client64/lib:$LD_LIBRARY_PATH"