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