node-oracledb thick mode with nextjs 13.5 #1606
Unanswered
OsamaAli2022
asked this question in
Q&A
Replies: 1 comment
-
Hi @OsamaAli2022 , |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
Beta Was this translation helpful? Give feedback.
All reactions