Discussions
Categories
- 196.9K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 545 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.6K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 440 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Is there a Node js guide on how to connect to Oracle autonomous DB ?

Hello,
I am trying to establish a connection to an Oracle Cloud Autonomous DB connection.
Followed the instructions listed here
But I feel some steps are missed.
Please let me know if there are detailed instructions on how to configure Node JS with oracle db .
the platform is Linux 7.
Currently I am running into
```
[[email protected] temp]# node testNode1.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'oracledb'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/root/temp/testNode1.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
```
Note post install I dont find oracledb.js present in the $NODE_PATH
Thank you
Chs
Answers
-
The Autonomous DB doc has a chapter for this: Connect with Python, Node.js, and other Scripting Languages
Really the only extra step needed is putting the wallet files in the correct location, and perhaps (depending where you install it) editing one path in sqlnet.ora.
There may be some tips in https://static.rainfocus.com/oracle/oow19/sess/1553560683840001mfXq/PF/DEV4626-Developing-and-Deploying-Python-and-Node.js-Applications-in-Docker_1568845042122001Vsfl.pdf that could be useful.
The next (4.1) release of node-oracledb will also have a section on Autonomous DB in the node-oracledb documentation.
Personally I would just install node-oracledb from npm via normal package.json dependencies, and not use the node-oracledb RPM. With the latter, you need to make sure NODE_PATH is set, and you don't get a choice of which version of Instant Client to use.
-
The node-oracledb doc for this has gone live. See Connecting to Oracle Autonomous Database.