Skip to content

Install problem with Windows XP #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
HaroldLowery opened this issue Jul 13, 2013 · 7 comments
Closed

Install problem with Windows XP #398

HaroldLowery opened this issue Jul 13, 2013 · 7 comments

Comments

@HaroldLowery
Copy link

I’m new to node.js and I’m having a problem installing on Windows XP.
I have node installed and working and PostgreSQL working as well, but I cannot get node-postgres to install. I’ve searched the documentation and issues, but I’m baffled.

c:\StrongTower\0Javascript\node.js\node\npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 200 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/pg/-/pg-2.1.0.tgz
npm http 200 https://registry.npmjs.org/pg/-/pg-2.1.0.tgz
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0
npm http GET https://registry.npmjs.org/ref/0.1.3
npm http GET https://registry.npmjs.org/generic-pool/2.0.3
npm http 304 https://registry.npmjs.org/ref/0.1.3
npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0
npm http 304 https://registry.npmjs.org/generic-pool/2.0.3
npm http GET https://registry.npmjs.org/ref/-/ref-0.1.3.tgz
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-2.0.3.tgz
npm http 200 https://registry.npmjs.org/generic-pool/-/generic-pool-2.0.3.tgz
npm http 200 https://registry.npmjs.org/ref/-/ref-0.1.3.tgz
npm http GET https://registry.npmjs.org/cloned/0.0.1
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/cloned/0.0.1
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rmdir
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/debug

ref@0.1.3 install C:\StrongTower\0Javascript\node.js\node\node_modules\pg\noe_modules\ref
node-gyp rebuild

C:\StrongTower\0Javascript\node.js\node\node_modules\pg\node_modules\ref>node
"C:\StrongTower\0Javascript\node.js\node\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http 304 https://registry.npmjs.org/rmdir
gyp ERR! configure error
gyp ERR! stack Error: Command failed: Traceback (most recent call last):
gyp ERR! stack File "(string)", line 1, in ?
gyp ERR! stack ImportError: No module named platform
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:637:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:735:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:802:5)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "C:\StrongTower\0Javascript\node.js\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
rebuild"
gyp ERR! cwd C:\StrongTower\0Javascript\node.js\node\node_modules\pg\node_modules\ref
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.1
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

@brianc
Copy link
Owner

brianc commented Jul 15, 2013

2nd bug report related to the ref dependency not building on windows. Try forking this repo, change ref from dependencies to optionalDependencies in package.json and install from your fork url. If that install works, I'll change it here. the ref dependency is only used in rare cases of parsing binary mode results in pure javascript. The fact that it's a native dependency is what's failing to build.

@pspi
Copy link

pspi commented Jul 15, 2013

I'm having the same problem with Windows 7.

@brianc
Copy link
Owner

brianc commented Jul 15, 2013

@HaroldLowery @pspi can you run this command?

npm install git://github.com/brianc/node-postgres.git#issues/398

@HaroldLowery
Copy link
Author

Brian,
Please excuse the close and reopen - I hit the wrong button.
I loaded Git version 1.8.3, then ran the command with these results:

npm http GET https://registry.npmjs.org/generic-pool/2.0.3
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0
npm http GET https://registry.npmjs.org/ref/0.1.3
npm http 304 https://registry.npmjs.org/generic-pool/2.0.3
npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-2.0.3.tgz
npm http GET https://registry.npmjs.org/buffer-writer/-/buffer-writer-1.0.0.tgz
npm http 304 https://registry.npmjs.org/ref/0.1.3
npm http 200 https://registry.npmjs.org/buffer-writer/-/buffer-writer-1.0.0.tgz
npm http 200 https://registry.npmjs.org/generic-pool/-/generic-pool-2.0.3.tgz
npm http GET https://registry.npmjs.org/cloned/0.0.1
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cloned/0.0.1
npm http GET https://registry.npmjs.org/cloned/-/cloned-0.0.1.tgz

ref@0.1.3 install C:\StrongTower\0Javascript\node.js\node\node_modules\pg\node_modules\ref
node-gyp rebuild

C:\StrongTower\0Javascript\node.js\node\node_modules\pg\node_modules\ref>node "C:\StrongTower\0Javascript\node.js\node\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: Traceback (most recent call last):
gyp ERR! stack File "", line 1, in ?
gyp ERR! stack ImportError: No module named platform
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:637:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:735:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:802:5)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "C:\StrongTower\0Javascript\node.js\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\StrongTower\0Javascript\node.js\node\node_modules\pg\node_modules\ref
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.1
gyp ERR! not ok
npm http 200 https://registry.npmjs.org/cloned/-/cloned-0.0.1.tgz
npm WARN optional dep failed, continuing ref@0.1.3
npm http GET https://registry.npmjs.org/rmdir
npm http 304 https://registry.npmjs.org/rmdir

pg@2.2.0 install C:\StrongTower\0Javascript\node.js\node\node_modules\pg
node-gyp rebuild || (exit 0)

C:\StrongTower\0Javascript\node.js\node\node_modules\pg>node "C:\StrongTower\0Javascript\node.js\node\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: Traceback (most recent call last):
gyp ERR! stack File "", line 1, in ?
gyp ERR! stack ImportError: No module named platform
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:637:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:735:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:802:5)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "C:\StrongTower\0Javascript\node.js\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\StrongTower\0Javascript\node.js\node\node_modules\pg
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.1
gyp ERR! not ok
npm WARN unmet dependency C:\StrongTower\0Javascript\node.js\node\node_modules\npm requires normalize-package-data@'~0.1.7' but will load
npm WARN unmet dependency C:\StrongTower\0Javascript\node.js\node\node_modules\normalize-package-data,
npm WARN unmet dependency which is version 0.2.0
pg@2.2.0 node_modules\pg
├── generic-pool@2.0.3
└── buffer-writer@1.0.0 (async@0.2.9, cloned@0.0.1)

@brianc
Copy link
Owner

brianc commented Jul 16, 2013

I think that output is indicating the install functioned correctly. Were you able to use the module after installing directly from the git URL? You cannot use the native bindings because you don't have a correct compiler environment set up, but the JavaScript bindings are what I use on all my projects anyway, so I wouldn't be concerned about that.

@HaroldLowery
Copy link
Author

Agree that I want to use the JavaScript bindings, not the native.
When I run “npm ls pg” I appear to have pg loaded:

npm WARN unmet dependency C:\StrongTower\0Javascript\node.js\node\node_modules\npm requires normalize-package-data@'~0.1.7' but will load
npm WARN unmet dependency C:\StrongTower\0Javascript\node.js\node\node_modules\normalize-package-data,
npm WARN unmet dependency which is version 0.2.0
C:\StrongTower\0Javascript\node.js\node
└── pg@2.2.0

I tried the “Simple” example code, but the require statement throws an error, apparently because it can't find pg.

module.js:340
throw err;
^
Error: Cannot find module 'pg'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\StrongTower\0Javascript\node.js\Prototype\Proto1\simple.js:7:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

@HaroldLowery
Copy link
Author

I got node-postgres working on my system by commenting out references to the ref module in ..\pg\lib\types\index.js . That's okay for what I'm working on, but probably isn't the right answer for this issue.

@brianc brianc closed this as completed in 910cc13 Jul 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants