Node-oracledb: NJS-069: node-oracledb 4.0.0 requires Node.js 10.16 or later

Created on 19 Aug 2019  路  9Comments  路  Source: oracle/node-oracledb

The error message sounds pretty clear, but ... I'm already using nodejs version 10.16 and the error continues. Already uninstalled node_modules, installed again, already updated to version 12 and the error continues.

What can I do to fix?

question

All 9 comments

The first thing to do is give details asked for in the issue template questions so we know what you are doing. At a guess, you are using Electron and therefore not actually deploying to 10.16 - see previously opened issues.

Oh sorry.

I am trying to run my application with ElectronJS as you said. I reinstalled electron on NodeJS version 10.16 and reinstalled the packages, however the problem persists:

error on start Error: NJS-069: node-oracledb 4.0.0 requires Node.js 10.16 or later at Object.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\oracledb\lib\oracledb.js:34:9) at Object.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\oracledb\lib\oracledb.js:310:3) at Module._compile (internal/modules/cjs/loader.js:693:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10) at Module.load (internal/modules/cjs/loader.js:602:32) at tryModuleLoad (internal/modules/cjs/loader.js:541:12) at Function.Module._load (internal/modules/cjs/loader.js:533:3) at Function.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\@sentry\node\dist\integrations\console.js:40:47) at Function._load (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\@sentry\node\dist\integrations\http.js:63:47) at Module.require (internal/modules/cjs/loader.js:640:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\oracledb\index.js:1:173) at Object.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\oracledb\index.js:3:3) at Module._compile (internal/modules/cjs/loader.js:693:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10) at Module.load (internal/modules/cjs/loader.js:602:32) at tryModuleLoad (internal/modules/cjs/loader.js:541:12) at Function.Module._load (internal/modules/cjs/loader.js:533:3) at Function.<anonymous> (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\@sentry\node\dist\integrations\console.js:40:47) at Function._load (C:\Users\claud\OneDrive\Documentos\repos\tdm-webcheckin-integrator\node_modules\@sentry\node\dist\integrations\http.js:63:47) at Module.require (internal/modules/cjs/loader.js:640:17) at require (internal/modules/cjs/helpers.js:20:18)

$ electron --version

v6.0.2

$ node --version
v10.16.0

see previously opened issues.

https://github.com/oracle/node-oracledb/issues/918

If you create an Electron app that displays the Node.js version process.version, what does it show when it runs?

Wow, he showed me version 10.11. I have no idea how this is possible, do you have any idea how to fix it?

@claudiooliveira Unless someone who uses Electron jumps in with a solution, then in the short term follow #918 and use node-oracledb 3.1.2

Doesn't/Can't Electron use Node 12?

Thanks, I was able to use nodejs version 10.16 using electron-rebuild:

https://stackoverflow.com/questions/56630313/problems-compiling-node-js-version-with-electron

The part of my package.json that matters:

{
  "name": "package",
  "version": "1.0.0",
  "main": "app.js",
  "scripts": {
    "rebuild": "electron-rebuild -f -w oracledb"
  },
  "dependencies": {
    "@sentry/node": "^5.1.0",
    "cron": "^1.7.0",
    "jsonwebtoken": "^8.5.0",
    "lodash": "^4.17.11",
    "lowdb": "^1.0.0",
    "oracledb": "^4.0.1",
    "request": "^2.88.0",
    "request-promise": "^4.2.4"
  },
  "devDependencies": {
    "electron": "^6.0.2",
    "electron-rebuild": "^1.8.6"
  }
}

@claudiooliveira thanks for sharing.

Was this page helpful?
0 / 5 - 0 ratings