Closed djaonourside closed 9 years ago
I have very similar environment to @djaonourside. This was working for me very recently, but no longer is :cry:.
windows 8 node v0.12.2 postgresql 9.4 python 2.7.8
D:\www\a>npm install libpq
npm WARN package.json FulcrumFieldLoader@0.0.1 No repository field.
npm WARN package.json FulcrumFieldLoader@0.0.1 No README data
> libpq@1.6.3 install D:\www\a\node_modules\libpq
> node-gyp rebuild
D:\www\a\node_modules\libpq>if not defined npm_config_node_gyp (node "c:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin
\node-gyp.js" rebuild ) else (rebuild)
Traceback (most recent call last):
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_m
ain.py", line 18, in <module>
sys.exit(gyp.script_main())
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\__init__.py", line 534, in script_main
return main(sys.argv[1:])
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\__init__.py", line 527, in main
return gyp_main(args)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\__init__.py", line 503, in gyp_main
options.circular_check)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\__init__.py", line 129, in Load
params['parallel'], params['root_targets'])
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 2692, in Load
variables, includes, depth, check, True)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 388, in LoadTargetBuildFile
build_file_data, PHASE_EARLY, variables, build_file_path)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 1211, in ProcessVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, phase, variables, build_file)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 1088, in ProcessConditionsInDict
variables, build_file)
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 1159, in ProcessVariablesAndConditionsInDict
variables, build_file, 'variables')
File "c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib
\gyp\input.py", line 1170, in ProcessVariablesAndConditionsInDict
'only, found ' + expanded.__class__.__name__ + ' for ' + key
ValueError: Variable expansion in this context permits str and int only, found l
ist for pgconfig 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_module
s\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\www\a\node_modules\libpq
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\\Program Files\\nodejs\\\\node.exe" "c:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "libpq"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! libpq@1.6.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libpq@1.6.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the libpq 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 libpq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\www\a\npm-debug.log
Why the four backslashes before node.exe, I wonder?
npm ERR! argv "c:\\Program Files\\nodejs\\\\node.exe" "c:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "libpq"
I'm pretty sure this commit is the culprit: https://github.com/brianc/node-libpq/commit/d658d489d0b87c4e2e432fb880d1457e987324f6
Can you look at that gypfile config in there and see if there are any obvious errors? I don't have access to a windows machine. If all else fails I can manually undo the changes to the windows version of the config since it seemed to work just fine previously.
@djaonourside @eczajk1 can you see if this PR fixes your install issue?
It works! Glad it was obvious for you because it wasn't for me.
I really appreciate you taking a look! Ill merge and release within the hour! :dancer:
On Monday, May 18, 2015, Eric Czajkowski notifications@github.com wrote:
It works! Glad it was obvious for you because it wasn't for me.
— Reply to this email directly or view it on GitHub https://github.com/brianc/node-libpq/issues/19#issuecomment-103042232.
Sounds like #20 did the trick. :checkered_flag:
Hello! My machine enviroment: windows 8 node v0.12.2 postgresql 9.4 python 2.7.9 64-bit(also used 2.7.3) pg_config in PATH I also tried run on win 7 pc with the same stuff, but I have same err log after "npm install libpq":
PS D:\projects\test> npm install libpq
D:\projects\test\node_modules\libpq>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\n pm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild) Traceback (most recent call last): File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 18, in
sys.exit(gyp.script_main()) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gypinit.py", line 534, in scri pt_main
return main(sys.argv[1:]) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gypinit.py", line 527, in main
return gyp_main(args) File "C:\Program Files\nodejs\node_modules\npm\nodemodules\node-gyp\gyp\pylib\gypinit.py", line 503, in gyp main
options.circular_check) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gypinit.py", line 129, in Load
params['parallel'], params['root_targets']) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2692, in Load
variables, includes, depth, check, True) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 388, in LoadTar getBuildFile
build_file_data, PHASE_EARLY, variables, build_file_path) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1211, in Proces sVariablesAndConditionsInDict
ProcessConditionsInDict(the_dict, phase, variables, build_file) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1088, in Proces sConditionsInDict
variables, build_file) File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1159, in Proces sVariablesAndConditionsInDict
variables, build_file, 'variables') File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 1170, in Proces sVariablesAndConditionsInDict
'only, found ' + expanded.class.name + ' for ' + key ValueError : Variable expansion in this context permits str and int only, found list for pgconfig while trying to load binding.gy p 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\conf igure.js:343:16) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "re build" gyp ERR! cwd D:\projects\test\node_modules\libpq gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js " "install" "libpq" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE npm ERR! libpq@1.6.3 install:node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the libpq@1.6.3 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the libpq 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 libpq npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! D:\projects\test\npm-debug.log