Я попытался подключиться к Oracle DB с помощью nodejs. Ниже приведен фрагмент кода кода.npm Ошибка установки OracleDB?
oracledb.getConnection(
{
user : "hr",
password : "welcome",
connectString : "localhost/XE"
},(function(err){
if(!err) {
console.log("Database is connected ... \n\n");
} else {
console.log(util.inspect(conString,false,null));
console.log("Error connecting database ... \n\n"+client);
}
}));
Я получаю ниже ошибки «Ошибка: Не удается найти модуль„oracledb“» и устал, чтобы установить модуль Oracle с помощью npm install oracledb
, но не удалось установить: Ниже ошибка я получаю
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\
e_modules\node-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\n
-gyp\lib\configure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_m
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\UOC_UCAATM\script_new\node_modules\oracledb
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
Могли кто-нибудь, пожалуйста, дайте мне знать, как решить эту проблему.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
\\node_modules\\npm\\bin\\npm-cli.js" "install" "oracledb"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\UOC_UCAATM\script_new\npm-debug.log
'Невозможно найти исполняемый файл Python" python "'. Это означает, что вам нужен python для установки этого модуля. – x4rf41
Возможный дубликат [npm install oracledb: Ошибка не найдена: $ OCI \ _LIB \ _DIR/libclntsh.dylib] (https://stackoverflow.com/questions/41669569/npm-install- oracledb дающий ошибок, не может-найти-OCI-Lib-Dir-libclntsh-dylib) –