Error: NJS-045: cannot load the oracledb add-on binary for Node.js 10.17.0 (linux, x64) - node-oracledb

I'm updating my aws lambda functions to new node runtime 10.x from 8.11.
For this, I updated the existing oracle binaries (node-oracledb 1.13.1) to (node-oracledb 4.1.0) and published a package in to npm registry. After updating the node-oracledb#4.1.0, I'm getting the following error when one of the lambda function tries to insert data in to oracle db.
> "errorType": "Error",
> "errorMessage": "NJS-045: cannot load the oracledb add-on binary for Node.js 10.17.0 (linux, x64)\nCannot load
> /var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node\nThe
> module
> '/var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node'\nwas
> compiled against a different Node.js version
> using\nNODE_MODULE_VERSION 57. This version of Node.js
> requires\nNODE_MODULE_VERSION 64. Please try re-compiling or
> re-installing\nthe module (for instance, using `npm rebuild` or `npm
> install`).\nNode-oracledb installation instructions:
> https://oracle.github.io/node-oracledb/INSTALL.html\nYou must have
> 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with
> ldconfig.\nIf you do not have Oracle Database on this computer, then
> install the Instant Client Basic or Basic Light package from
> \nhttp://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html\n",
> "stack": [
> "Error: NJS-045: cannot load the oracledb add-on binary for Node.js 10.17.0 (linux, x64)",
> "Cannot load /var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node",
> "The module '/var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node'",
> "was compiled against a different Node.js version using",
> "NODE_MODULE_VERSION 57. This version of Node.js requires",
> "NODE_MODULE_VERSION 64. Please try re-compiling or re-installing",
> "the module (for instance, using `npm rebuild` or `npm install`).",
> "Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html",
> "You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.",
> "If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from ",
> "http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html",
> "",
> " at Object.<anonymous> (/var/task/node_modules/polaris-oracledbtest-4-lambda/lib/oracledb.js:68:13)",
> " 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)",
> " at Module.require (internal/modules/cjs/loader.js:692:17)",
> " at require (internal/modules/cjs/helpers.js:25:18)",
> " at Object.<anonymous> (/var/task/node_modules/polaris-oracledbtest-4-lambda/index.js:1:18)",
> " at Module._compile (internal/modules/cjs/loader.js:778:30)"
> ]

Check you actually did cleanly upgrade node-oracledb. The error message is something from the NAN era (pre node-oracledb 4.0) which caused a tight coupling between the node-oracledb binary and Node.js version. This is why you get messages about the NODE_MODULE_VERSION incopmpatibility. In node-oracledb 4, the implementation changed to use N-API which allows one node-oracledb binary to be used with multiple Node.js versions.

Related

Could not resolve all artifacts for configuration ':payu-non-seam-less-react:releaseRuntimeClasspath'

I was using the PayU payment gateway since last year in a project and it was working fine but when I'm using that project now then i getting error:-
> Could not resolve all artifacts for configuration ':payu-non-seam-less-react:releaseRuntimeClasspath'.
> Could not resolve in.payu:payu-crash-logger:[1.0.4,1.1.0).
Required by:
project :payu-non-seam-less-react > in.payu:payu-checkout-pro:1.8.9
project :payu-non-seam-less-react > in.payu:payu-checkout-pro:1.8.9 > in.payu:payu-sdk:5.4.7
> Failed to list versions for in.payu:payu-crash-logger.
> Unable to load Maven meta-data from https://phonepe.bintray.com/PhonePeIntentSDK/in/payu/payu-crash-logger/maven-metadata.xml.
> Could not get resource 'https://phonepe.bintray.com/PhonePeIntentSDK/in/payu/payu-crash-logger/maven-metadata.xml'.
> Could not GET 'https://phonepe.bintray.com/PhonePeIntentSDK/in/payu/payu-crash-logger/maven-metadata.xml'. Received
status code 502 from server: Bad Gateway
finally, I resolve this problem
first i uninstall payu-non-seam-less-react (means old version)
then install the latest version.
but then I stuck with new errors then I clear the build(./gradlew clean)
and then I added below code in android/gradle.properties
org.gradle.jvmargs=-Xmx4608m
then run this project.

Node Sass Unsupported runtime error when building a Next.js project

I get this error message when I try to build my Next.js project; what is the problem?
> (base) net-MS24:~/Documents/myproject$ npm run build
> myproject#1.0.0 build
> next build
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
Loaded env from /home/xxxy/Documents/myproject/.env
Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected.
See here for more info: https://err.sh/next.js/built-in-css-disabled
info - Creating an optimized production build
Failed to compile.
./pages/content/_index.scss
Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
> Build error occurred
Error: > Build failed because of webpack errors
at build (/home/xxxy/Documents/myproject/node_modules/next/dist/build/index.js:15:918)

Azure Devops Failing on npm install (Cannot find module 'Selenium-Webdriver'

I am trying to integrate Selenium IDE with Azure devops test plan
I have an "NPM install" task in my release pipeline and received an error of Error: Npm failed with return code: 1
This is the error from the log:
2020-10-12T22:37:37.9680875Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" test"
2020-10-12T22:38:16.6366869Z
2020-10-12T22:38:16.6367643Z > ind#1.0.0 test D:\a\r1\a\Test_IND-CI \drop\Selenium IDE
2020-10-12T22:38:16.6368107Z > npx mocha --reporter xunit > result.xml
2020-10-12T22:38:16.6368363Z
2020-10-12T22:38:16.6368738Z npx: installed 136 in 32.857s
2020-10-12T22:38:16.6368973Z
2020-10-12T22:38:16.6369245Z Error: Cannot find module 'selenium-webdriver'
2020-10-12T22:38:16.6369465Z Require stack:
2020-10-12T22:38:16.6369714Z - D:\a\r1\a\Test_IND-CI \drop\Selenium IDE\test.js
2020-10-12T22:38:16.6370004Z - C:\npm\cache\_npx\5920\node_modules\mocha\lib\esm-utils.js
2020-10-12T22:38:16.6370300Z - C:\npm\cache\_npx\5920\node_modules\mocha\lib\mocha.js
2020-10-12T22:38:16.6370850Z - C:\npm\cache\_npx\5920\node_modules\mocha\lib\cli\one-and-dones.js
2020-10-12T22:38:16.6371232Z - C:\npm\cache\_npx\5920\node_modules\mocha\lib\cli\options.js
2020-10-12T22:38:16.6371553Z - C:\npm\cache\_npx\5920\node_modules\mocha\bin\mocha
2020-10-12T22:38:16.6371883Z at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
2020-10-12T22:38:16.6372236Z at Function.Module._load (internal/modules/cjs/loader.js:841:27)
2020-10-12T22:38:16.6372757Z at Module.require (internal/modules/cjs/loader.js:1025:19)
2020-10-12T22:38:16.6373259Z at require (internal/modules/cjs/helpers.js:72:18)
2020-10-12T22:38:16.6373925Z at Object.<anonymous> (D:\a\r1\a\Test_IND-CI \drop\Selenium IDE\test.js:2:37)
2020-10-12T22:38:16.6374606Z at Module._compile (internal/modules/cjs/loader.js:1137:30)
2020-10-12T22:38:16.6374983Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
2020-10-12T22:38:16.6375320Z at Module.load (internal/modules/cjs/loader.js:985:32)
2020-10-12T22:38:16.6375644Z at Function.Module._load (internal/modules/cjs/loader.js:878:14)
2020-10-12T22:38:16.6375999Z at Module.require (internal/modules/cjs/loader.js:1025:19)
2020-10-12T22:38:16.6382142Z at require (internal/modules/cjs/helpers.js:72:18)
2020-10-12T22:38:16.6382865Z at Object.exports.requireOrImport (C:\npm\cache\_npx\5920\node_modules\mocha\lib\esm-utils.js:20:12)
2020-10-12T22:38:16.6385244Z at Object.exports.loadFilesAsync (C:\npm\cache\_npx\5920\node_modules\mocha\lib\esm-utils.js:33:34)
2020-10-12T22:38:16.6385856Z at Mocha.loadFilesAsync (C:\npm\cache\_npx\5920\node_modules\mocha\lib\mocha.js:427:19)
2020-10-12T22:38:16.6387258Z at singleRun (C:\npm\cache\_npx\5920\node_modules\mocha\lib\cli\run-helpers.js:156:15)
2020-10-12T22:38:16.6388582Z at exports.runMocha (C:\npm\cache\_npx\5920\node_modules\mocha\lib\cli\run-helpers.js:225:10)
2020-10-12T22:38:16.6389265Z at Object.exports.handler (C:\npm\cache\_npx\5920\node_modules\mocha\lib\cli\run.js:366:11)
2020-10-12T22:38:16.6390655Z at C:\npm\cache\_npx\5920\node_modules\mocha\node_modules\yargs\lib\command.js:241:49
2020-10-12T22:38:16.6391922Z npm ERR! Test failed. See above for more details.
2020-10-12T22:38:16.6590665Z ##[warning]Couldn't find a debug log in the cache or working directory
2020-10-12T22:38:16.6612445Z ##[error]Error: Npm failed with return code: 1
This is the settings of my npm install task:
Azure Devops Failing on npm install (Cannot find module 'Selenium-Webdriver'
According to the error message:
Error: Cannot find module 'selenium-webdriver'
And the configuration screenshot of the build definition, we could to know that you execute the npm test directly without the packages. we need to use npm install command line to ensure that all the packages are installed:
npm install selenium-webdriver --save or npm install
You could check this thread for some more details.

Protractor - error when starting webdriver-manager, seleniumProcess.pid: undefined

I am facing a problem when starting webdriver-manager in node_modules\protractor with windows 7. the command is :
node webdriver-manager start
Then I got the following error messages:
seleniumProcess.pid: undefined
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1028:32)
at child_process.js:1109:20
at process._tickCallback (node.js:343:11)
at Function.Module.runMain (module.js:492:11)
at startup (node.js:124:16)
at node.js:807:3
After searching on the Internet, I cannot find any similar question like mine that the seleniumProcess.pid is undefined.
Following is the output for java -version:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Any idea?
Ok, I figured out why I had this problem. You have only JRE, but
You will need to have the Java Development Kit (JDK) installed to run
the standalone Selenium Server. Check this by running java -version
from the command line. Tutorial
On Ubuntu I've done
$ sudo apt-get install openjdk-7-jdk
And now I have this Java:
$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.15.10.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
And webdriver-manager start works.
Error:
C:\XXXX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriv
er-manager\bin>webdriver-manager --verbose update
events.js:160
throw er; // Unhandled 'error' event
^
Error: unable to verify the first certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:1092:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:610:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
I did the following to remove this:
Try:
1. C:\XX\Roaming\npm\node_modules\protractor\node_modules\webdriv
er-manager\bin>webdriver-manager --proxy http://username:passwd#IP:port
080/ update
(Then it updated drivers in the location)
webdriver-manager status
C:\XX\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\bin>webdriver-manager --verbose start
It is started working,
I expect this is happening repeatedly due to corruption of drivers. May we need to graceful stop to work.
Try to add C:\Windows\System32\ there (right-click My Computer -> Properties -> Advanced system settings -> Environment Variables -> Edit... PATH and add C:\Windows\System32 to the end (with a semi-colon separating each variable).

Protractor 0.16.1 e2e AngularJS - Starting selenium standalone server... events.js:72 Error: spawn ENOENT

Attempted Project: https://github.com/yearofmoo/angularjs-seed-repo
Environment:
Windows 7 64-bit
NodeJS v 0.10.24
Protractor v 0.16.1
grunt v0.4.2
grunt-cli v0.1.11
Notes:
For selenium, install_selenium_standalone has been replaced by webdriver-manager binary around 12/2/13 according to [Julie's post][1]. This seems to be related to the issue.
Also, git must be installed in the project directory and npm install must be run using Git Bash in Windows.
Error in Git Bash:
$ grunt test:e2e --debug
Running "connect:testserver" (connect) task
[D] Task source: c:\nodejs-0.10.24\node_modules\grunt-contrib-connect\tasks\conn
ect.js
Started connect web server on 127.0.0.1:9999.
Running "protractor:singlerun" (protractor) task
[D] Task source: c:\nodejs-0.10.24\node_modules\grunt-protractor-runner\tasks\pr
otractor_runner.js
Starting selenium standalone server...
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
>
Fatal error: protractor exited with code: 8
Java is required to run selenium, so it seems You don't have any.

Resources