- 
  Notifications
 You must be signed in to change notification settings 
- Fork 1.1k
node-oracledb thick mode with nextjs 13.5 #1606
-
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
Replies: 1 comment
-
Hi @OsamaAli2022 ,
Can you let us know how did you install the oracledb package? Was it through npm or sourced from GitHub?
Beta Was this translation helpful? Give feedback.