question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error upon requiring ibm_db module

See original GitHub issue

Current behavior

If I require the module “ibm_db” from either spec file or plugins/index.js I get the following error:

Immagine 2021-02-15 141817

The stacktrace is the following:

Error: The module '\\?\C:\[...]\node_modules\ibm_db\build\Release\odbc_bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 85. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1812)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1812)
    at Module.load (internal/modules/cjs/loader.js:992:32)
    at Module._load (internal/modules/cjs/loader.js:885:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Module.require (internal/modules/cjs/loader.js:1032:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at bindings (C:\[...]\node_modules\bindings\bindings.js:112:48)
    at Object.<anonymous> (C:\[...]\node_modules\ibm_db\lib\odbc.js:57:31)
    at Module._compile (internal/modules/cjs/loader.js:1152:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
    at Module.load (internal/modules/cjs/loader.js:992:32)
    at Module._load (internal/modules/cjs/loader.js:885:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Module.require (internal/modules/cjs/loader.js:1032:19)

Desired behavior

I would like to import the module as a plugin/command in order to perform DB2 queries.

Test code to reproduce

It is sufficient to install the “ibm_db2” module and then requiring it with:

var ibmdb = require('ibm_db');

Versions

Cypress version 6.4.0 on Windows

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bahmutovcommented, Feb 15, 2021

Tell Cypress to use the system Node https://on.cypress.io/configuration#Node-version

Look at the slides https://slides.com/bahmutov/cypress-beyond-the-hello-world#/5/3/0 (press down key to go through this column of slides) or watch the entire presentation https://www.youtube.com/watch?v=Q5djbLL1Pjg

0reactions
lhimocommented, Feb 16, 2021

yes a js file outside cypress folder

Il mar 16 feb 2021, 17:42 Gleb Bahmutov notifications@github.com ha scritto:

Normal meaning not a cypress plugin?

Sent from my iPhone

On Feb 16, 2021, at 11:25, Leonardo Properzi notifications@github.com wrote:

If it helps, running a normal js file prints correctly to the console

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/15092#issuecomment-779961789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITH4USGUAHABBUHXBT6U4LS7KOAVANCNFSM4XUV6HUA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in installing ibm_db · Issue #520 · ibmdb/node ... - GitHub
Hello all, Currently i am working on nodejs. My O.S. & nodejs details are---> O.S.--> Windows 10, X64 Nodejs --> 11.11.0 node-gyp--> 3.3.1...
Read more >
problem using ibm_db on node.js - Forums - IBM Support
I am currently developing a node.js application using the ibm_db module. When i try to push the application a compile error seems to...
Read more >
Node JS Binding error when trying to use IBM_DB
I am getting the below error when trying to use IBM_DB for db2 access. Here is the code I'm using: var http =...
Read more >
ibm-db 3.1.1 - PyPI
For installing ibm_db on Docker Linux container, you may need to install ... in <module> Exception: [IBM][CLI Driver] SQL1042C An unexpected system error...
Read more >
node-ibm_db - npm
Default compiler on RHEL 6 does not have the required support. ... If npm install ibm_db aborts with "Out Of Memory" error on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found