{"id":16473,"library":"oracle","title":"Legacy Oracle Database Driver (node-oracle)","description":"The `oracle` package provides an obsolete Node.js driver for Oracle databases. It reached version 0.4.1 before being officially abandoned by its maintainer. This driver is not actively developed, receives no updates, and is not recommended for new projects or existing applications. The project explicitly states it is no longer maintained and directs users to the official `node-oracledb` package, developed and supported by Oracle, as its direct and modern replacement. There is no defined release cadence, and its key differentiator is its historical role as an early community-contributed Oracle driver before Oracle released its own official solution.","status":"abandoned","version":"0.4.1","language":"javascript","source_language":"en","source_url":"git://github.com/joeferner/node-oracle","tags":["javascript","database","db","oracle"],"install":[{"cmd":"npm install oracle","lang":"bash","label":"npm"},{"cmd":"yarn add oracle","lang":"bash","label":"yarn"},{"cmd":"pnpm add oracle","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only due to its age (targeting Node.js >=0.6.0). ESM imports are not supported. It is strongly recommended to use `node-oracledb` instead.","symbol":"oracle","correct":"const oracle = require('oracle');"},{"note":"The primary interaction pattern was via the `connect` method on the main module export. For `node-oracledb`, the connection pattern is different, typically `oracledb.getConnection`.","symbol":"connect","correct":"const oracle = require('oracle'); oracle.connect( /* ... */ );"},{"note":"The package likely offered connection pooling, instantiated directly from the main module export. Modern `node-oracledb` provides pooling via `oracledb.createPool`.","symbol":"Pool","correct":"const oracle = require('oracle'); const pool = new oracle.Pool( /* ... */ );"}],"quickstart":{"code":"/*\nThis quickstart is intentionally left blank.\n\nThe `oracle` package is abandoned and not maintained.\nIt is strongly advised against using this package in any project.\n\nPlease use the officially supported `oracledb` package instead:\n\nnpm install oracledb\n\nRefer to the `node-oracledb` documentation for its quickstart:\nhttps://github.com/oracle/node-oracledb\n*/\n\n// Placeholder to fulfill quickstart requirements, do NOT run this code.\n// It is likely to fail with modern Node.js versions or require specific Oracle client setups.\n// const oracle = require('oracle');\n// oracle.connect(\n//   { hostname: 'localhost', port: 1521, database: 'ORCL', user: 'hr', password: 'hr' },\n//   function (err, connection) {\n//     if (err) {\n//       console.error(\"Error connecting to Oracle database:\", err);\n//       return;\n//     }\n//     console.log(\"Successfully connected to Oracle!\");\n//     connection.execute(\"SELECT 'Hello World' FROM DUAL\", [], function (err, results) {\n//       if (err) {\n//         console.error(\"Error executing query:\", err);\n//       }\n//       console.log(\"Query result:\", results);\n//       connection.close();\n//     });\n//   }\n// );","lang":"javascript","description":"This quickstart explicitly states the package is abandoned and directs users to the recommended `node-oracledb` package for any Oracle database interaction."},"warnings":[{"fix":"Migrate immediately to `node-oracledb` (npm install oracledb). This requires rewriting database interaction code as the APIs are different.","message":"This package is explicitly unmaintained and abandoned. It will not receive security patches, bug fixes, or compatibility updates. Using it in production is a significant risk.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"No fix for this package; switch to `node-oracledb`.","message":"The `oracle` package is highly unlikely to be compatible with recent versions of Node.js or modern Oracle client libraries without significant effort, if at all.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Remove `oracle` from your project dependencies and install `oracledb` instead: `npm uninstall oracle && npm install oracledb`.","message":"The official recommendation from the maintainer is to install and use `node-oracledb` instead. The `oracle` package serves no current purpose.","severity":"deprecated","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Ensure `npm install oracle@0.3.9` was run (though highly discouraged). Prefer `npm install oracledb` instead.","cause":"The package is not installed or the path is incorrect.","error":"Error: Cannot find module 'oracle'"},{"fix":"For the `oracle` package, ensuring proper ORACLE_HOME or LD_LIBRARY_PATH was difficult. For `node-oracledb`, refer to its installation guide for setting up Oracle Instant Client: https://github.com/oracle/node-oracledb/blob/main/INSTALL.md","cause":"Missing or incorrectly configured Oracle Client libraries (e.g., Instant Client). This package often had complex native dependencies.","error":"Error: NJS-045: cannot load the Oracle Dynamic Library"},{"fix":"Verify installation. However, this error is a strong indicator to migrate away from this abandoned package to `node-oracledb`.","cause":"The `oracle` module was not successfully required, or an older/corrupted version was installed.","error":"TypeError: oracle.connect is not a function"}],"ecosystem":"npm"}