You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we run our tests, we encounter the following error message from thenode-oracledb library:
NJS-069: node-oracledb 6.6.0 requires Node.js 14.6 or later.
Cypress reports this error as originating from our test code, causing our tests to automatically fail.
System Details
• Node.js Version: 20.17.0, then upgraded to v22.11.0.
node -v v20.17.0
npm -v 10.8.2
• oracledb Library Version: 6.6.0
Solutions We Have Tried
Node.js Version Update: We upgraded Node.js using nvm, first to 20.17.0 and then to v22.11.0, but the issue persisted.
Reinstalling the Library: We uninstalled and reinstalled oracledb (using npm uninstall oracledb and npm install oracledb), but no changes were observed.
Project Cleanup: We deleted the node_modules folder and package-lock.jsonfile, then reinstalled the project dependencies with npm install.
Environmental Variables Check: We confirmed that environment variables like ORACLE_HOME and LD_LIBRARY_PATH are properly set.
Desired behavior
We expect tests verifying Oracle database connections to work smoothly with the node-oracledb library in Cypress. Ideally, the tests should validate database connections successfully without any compatibility errors and proceed as expected.
Test code to reproduce
constoracledb=require('oracledb');// Veritabanı bağlantısını oluşturmaasyncfunctioncreatePool(){try{awaitoracledb.createPool({user: 'AAAA,
password: 'AAAA',connectString: '10.10.10.10:1010/AAA'});console.log('Successfully connected to Oracle Database!');}catch(err){console.error('Error connecting to Oracle Database:',err);throwerr;}}// Sorgu çalıştırma fonksiyonuasyncfunctionrunQuery(query){letconnection;try{connection=awaitoracledb.getConnection();constresult=awaitconnection.execute(query);awaitconnection.commit();returnresult;}catch(err){console.error('Query error:',err);throwerr;}finally{if(connection){try{awaitconnection.close();}catch(err){console.error('Error closing connection:',err);}}}}// Sorguları çalıştırasyncfunctioninit(){try{awaitcreatePool();// İlk sorguawaitrunQuery("DELETE FROM error_message_content WHERE ERROR_MESSAGE IN (SELECT id FROM ERROR_MESSAGE WHERE key='otomasyonAnahtar')");// İkinci sorguawaitrunQuery("DELETE FROM ERROR_MESSAGE WHERE key='otomasyonAnahtar'");}catch(err){console.error('Failed to execute delete queries:',err);}}// Bağlantı havuzunu kapatmaasyncfunctionclosePool(){awaitoracledb.getPool().close(0);}module.exports={ runQuery, init, closePool };
Cypress Version
13.15.1
Node version
v20.17.0
Operating System
macOS 14.7
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered:
@merveodabasi Are you requiring this file in your tests? Do you see this error outside of Cypress? I'm not understanding how this code is related to Cypress tests.
Current behavior
When we run our tests, we encounter the following error message from thenode-oracledb library:
Cypress reports this error as originating from our test code, causing our tests to automatically fail.
Solutions We Have Tried
Desired behavior
We expect tests verifying Oracle database connections to work smoothly with the node-oracledb library in Cypress. Ideally, the tests should validate database connections successfully without any compatibility errors and proceed as expected.
Test code to reproduce
Cypress Version
13.15.1
Node version
v20.17.0
Operating System
macOS 14.7
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: