我试图安装oracledb npm,但是出现错误。安装oracledb时出现错误npm
已经安装:
- 的NodeJS v6.11.0
- NPM 3.10.10
- 蟒蛇2.7
- 的Visual Studio 14
- 即时客户对Oracle 64位 个
- 窗10的64位
在系统环境变量
- 路径= C:\甲骨文\ instantclient
- 路径= C:\程序文件(x86)\的NodeJS \
- Path = C:\ Program Files(x86)\ Java \ jdk1.6.0_11 \ bin
- Path = C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ bin
- OCI_INC_DIR = C:\甲骨文\ instantclient \ SDK \包括
- OCI_LIB_DIR = C:\甲骨文\ instantclient \ SDK \ lib中\ MSVC
- 路径= C:\ Python27 \
ERROR:
C:\>npm install oracledb
> [email protected] install C:\node_modules\oracledb
> node-gyp rebuild
C:\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node "" rebuild)
Traceback (most recent call last):
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
return gyp_main(args)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
options.duplicate_basename_check)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
generator.CalculateVariables(default_variables, params)
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1900, in CalculateVariables
generator_flags.get('msvs_version', 'auto'))
File "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2014'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\node_modules\oracledb
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "oracledb"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
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! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR! npm bugs oracledb
npm ERR! Or if that isn't available, 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:\npm-debug.log
输出说确保你有最新版本的节点和NPM,但你似乎使用节点5.4.11。还要确保您的Node版本是64位,以匹配您安装的Oracle客户端。 – jpmc26
@ jpmc26将npm和node.js升级到最新版本,但仍会出现相同的错误。 –
@ jpmc26 node.js和oracle客户端都是64位。 –