简体   繁体   中英

The specified module could not be found - node oracledb

I have node app running using npm package oracledb. I am able to connect to remote oracle12c db successfully. Now issue is, in production box I cannot install all pre-requisite so I zipped working code and unzipped to the new windows box (node.js and oracle client libraries are installed with proper path). But when I start node server I get error. Is there anything I am missing? Please guide. Thanks

C:\node_modules\oracledb\lib\oracledb.js:38
    throw err;
    ^

Error: The specified module could not be found.
\\?\C:\node_modules\oracledb\build\Release\oracledb.node
    at Object.Module._extensions..node (module.js:664:18)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\node_modules\oracledb\lib\oracledb.js:35:19)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xyz@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xyz@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Check the installation instructions about copying binaries between machines . You may be missing the Visual Studio Redistributable.

If you have Oracle client 12.2, install the Visual Studio 2013 Redistributable. For Oracle client 12.1 install the Visual Studio 2010 Redistributable. For Oracle client 11.2 install the Visual Studio 2005 Redistributable.

The forthcoming node-oracledb v2 has prebuilt binaries (and better bootstrap error messages). You could just try installing the development release of v2 by using npm install oracledb@dev The production version is coming soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM