node-oracledb icon indicating copy to clipboard operation
node-oracledb copied to clipboard

Error about too old NodeJS version even when using recent one

Open mxlecanu opened this issue 2 years ago • 1 comments

  1. What versions are you using? Oracledb 5.4.0 Node.JS 16.16.0 Windows 7 x64 (localhost for now)
  1. Is it an error or a hang or a crash? Error

  2. What error(s) or behavior you are seeing? NJS-069 : node-oracledb 5.4.0 requires Node.js 8.16 or later

  1. Include a runnable Node.js script that shows the problem. const oracledb = require('oracledb');

Hi, I just created my first nextJS project, and was able to come to an "hello world" app running without specific issue. I need to connect ot an existing Oracle Database to display some info on a table, but I have a problme with the very first line of my JS file : const oracledb = require('oracledb'); The returned error explains that I should use Node.Js 8.16 or later, but I'm using 16.16.0...

To be noticed : I can't ignore this error, however the package seemes to work properly as I also get the "Successfully connected to Oracle!" message printed in my console after calling the oracledb.getConnection function.

If it can help you, here is the list of dependencies I'm using : "dependencies": { "@ant-design/icons": "4.6.4", "@next/bundle-analyzer": "11.1.2", "antd": "^4.21.7", "babel-plugin-import": "^1.13.5", "body-parser": "^1.20.0", "bootstrap": "^5.1.3", "dotenv": "^16.0.1", "dotenv-webpack": "^8.0.0", "express": "^4.18.1", "isomorphic-fetch": "^3.0.0", "next": "^12.2.2", "next-compose-plugins": "^2.2.1", "next-plugin-antd-less": "^1.8.0", "oracledb": "^5.4.0", "react": "^18.2.0", "react-bootstrap": "^2.4.0", "react-dom": "^18.2.0", "styled-components": "^5.3.5" }, "devDependencies": { "@babel/core": "^7.18.9" }

If any one has an Idea of what might go wrong, it would be very helpful ! I thank you by advance for your help and time.

mxlecanu avatar Jul 19 '22 16:07 mxlecanu

You are on 64-bit Windows system. Is instant client & node also 64-bit? what is your LD_LIBRARY_PATH environment variable value?

pvenkatraman avatar Jul 22 '22 07:07 pvenkatraman

Closing - no update.

The message will be correct. Where you are deploying the app is indicating the Node.js version to https://github.com/oracle/node-oracledb/blob/main/lib/oracledb.js#L31 as something that isn't expected or valid. Debugging might show you what is going on.

cjbj avatar Aug 12 '22 06:08 cjbj