Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

node-oracledb thick mode with nextjs 13.5 #1606

Unanswered
OsamaAli2022 asked this question in Q&A
Discussion options

DataBase: Oracle g11
nextjs: 13.5 (app route)
oracledb: 6.1
instant client: instantclient_11_1
Microsoft Visual C++ : vs2010
Error: NJS-045: cannot load a node-oracledb Thick mode binary for Node.js.
Looked for F:\NextJS\HumanResources\human_resources.next\server\build\Release\oracledb-6.1.0-win32-x64.node, F:\NextJS\HumanResources\human_resources.next\server\build\Release\oracledb.node, F:\NextJS\HumanResources\human_resources.next\server\build\Debug\oracledb.node, F:\NextJS\HumanResources\human_resources.next\server\vendor-chunks\node_modules\oracledb\build\Release\oracledb-6.1.0-win32-x64.node, F:\NextJS\HumanResources\human_resources.next\server\vendor-chunks\node_modules\oracledb\build\Release\oracledb.node

Error: ./node_modules/oracledb/lib/oracledb.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted..
Code Snippet:
const oracledb = require('oracledb'); oracledb.initOracleClient({ libDir: 'C:\\Oracle\\instantclient_11_1' });

NextJS 13.5 compiler can not find the required binaries when I run the app with npm run dev
I tried many possible solutions like webpack copy plugin..
Maybe I did not do it correctly..

Note: When I run the example.js file with node, it runs successfully and creates that table on my database and inserts
the rows as in the example file ..

Please help

You must be logged in to vote

Replies: 1 comment

Comment options

Hi @OsamaAli2022 ,
Can you let us know how did you install the oracledb package? Was it through npm or sourced from GitHub?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /