0
尝试使用npm安装Postgre并收到错误。我已经多次修复/检查相关的安装(PostgreSQL,Visual Studio,Node,Express)。任何帮助你可以给非常感激!我运行64位Windows 8在Windows 8上使用npm安装pg的错误
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN package.json [email protected] path is also the name of a node core module.
> [email protected] install C:\StrikeBack\node_modules\pg
> node-gyp rebuild || (exit 0)
C:\StrikeBack\node_modules\pg>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
'pg_config' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'pg_config --includedir' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\StrikeBack\node_modules\pg
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
[email protected] node_modules\pg
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected])
仍然差劲。问题似乎仍然是node-gyp。现在我收到以下消息: \t c:\ users \ mose \ .node-gyp \ 0.10.30 \ deps \ uv \ include \ uv-private/uv-win.h(32):fatal错误C1083:无法打开包含文件:'winsock2.h':没有这样的文件或目录[C:\ StrikeBack \ node_modules \ pg \ build \ binding.vcxproj] – 2014-09-04 21:52:59
您是否安装了VS Express或安装了付费VS?如果Express版本,如果您尚未安装Windows SDK,则可能还需要安装。 – mscdex 2014-09-05 00:26:58
我都安装了。仍然有问题。我也多次修复了所有安装。我确实安装了PostgreSQL(9.3)。 – 2014-09-14 21:46:09