node-oracledb
node-oracledb copied to clipboard
Error about too old NodeJS version even when using recent one
- What versions are you using? Oracledb 5.4.0 Node.JS 16.16.0 Windows 7 x64 (localhost for now)
-
Is it an error or a hang or a crash? Error
-
What error(s) or behavior you are seeing? NJS-069 : node-oracledb 5.4.0 requires Node.js 8.16 or later
- 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.
You are on 64-bit Windows system. Is instant client & node also 64-bit? what is your LD_LIBRARY_PATH environment variable value?
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.