Skip to content
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

Windows 7 x64 npm installation issue #405

Closed
tetri opened this issue Jul 22, 2013 · 12 comments
Closed

Windows 7 x64 npm installation issue #405

tetri opened this issue Jul 22, 2013 · 12 comments

Comments

@tetri
Copy link

tetri commented Jul 22, 2013

When I try to install pg module via npm I get the following errors:

npm http GET https://registry.npmjs.org/pg
npm http 304 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/generic-pool/2.0.3
npm http GET https://registry.npmjs.org/ref/0.1.3
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0
npm http 304 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 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/bindings
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/cloned/0.0.1
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/rmdir
gyp ERR! configure error
*gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.*
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:113:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:81:11
gyp ERR! stack     at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\nodejs\node_modules\pg\node_modules\ref
*gyp ERR! node -v v0.10.13*
*gyp ERR! node-gyp -v v0.10.2*
gyp ERR! not ok
npm ERR! weird error 1
npm http 304 https://registry.npmjs.org/rmdir
npm ERR! not ok code 0

Why Pyhton is nedded?

@brianc
Copy link
Owner

brianc commented Jul 22, 2013

Python is used in the build system node uses to compile 3rd party C/C++ add ons (node-waf & node-gyp).

node-postgres is supposed to continue to install even if its internal compilation fails because it provides a production quality pure-javascript client. Recently another C/C++ addon got added as a dependency for an obscure feature and has been failing to compile on windows breaking the install process. I need to make the 3rd party add-on an optional dependency. Not having access to a windows box its hard for me to test...but I do have a fix in mind & will try to publish a version for you to test later today. Sorry for the headache!

@tetri
Copy link
Author

tetri commented Jul 23, 2013

I checked that the node-gyp requires Python 2.7.3 and I have version 3.3.2 which is not supported... I'll do some tests and if successful I'll let you know...

If you need some help, I'm available...

@brianc
Copy link
Owner

brianc commented Jul 23, 2013

Thanks @tetri. Sorry for not pushing a version out yesterday...I'm gonna try to get to it today.

@brianc
Copy link
Owner

brianc commented Jul 25, 2013

I pushed a version making the dependency optional. This should fix your install issue.

@brianc brianc closed this as completed Jul 25, 2013
@tetri
Copy link
Author

tetri commented Jul 26, 2013

Sorry @brianc, but the installation still does not work due to the dependence of the ref module, which in turn depends on node-gyp module... I tested the installation in a completely clean environment

@brianc
Copy link
Owner

brianc commented Jul 26, 2013

What error are you getting?

@brianc brianc reopened this Jul 26, 2013
@tetri
Copy link
Author

tetri commented Jul 26, 2013

I'm having the same error that I reported in nodejs/node-gyp#296.
I believe that the most serious problem is the module node-gyp... You can keep this issue closed.

@DrYSG
Copy link

DrYSG commented Aug 22, 2013

Ditto for me: nodejs/node-gyp#312

@brianc
Copy link
Owner

brianc commented Aug 29, 2013

Hey, if you don't use the native bindings (I don't either!) then you can use this: https://github.com/brianc/node-postgres-pure

skip the pesky compile step all together.

@DrYSG
Copy link

DrYSG commented Aug 29, 2013

Please excuse this simple (klutz) question. I tried the npm install on postgres-pure, I got the error below. I assume I need to get GnuMake and add it to the path. But just to make sure, is this the MAKE that you want me to install?
Are there other WARNs or things in this npm install that indicate deeper issues?

http://gnuwin32.sourceforge.net/packages/make.htm

@DrYSG

image

@DrYSG
Copy link

DrYSG commented Oct 1, 2013

The npm install of the pure version is now working find for me (I have no idea what changed in the meantime since my last letter): https://github.com/brianc/node-postgres-pure, I am also really like the API and enjoy working with it. I will tell you how it works with PostGIS

BTW( any idea what the warnings are about?)

@DrYSG

775bbda2-2ad1-11e3-9089-dc2c13771447

@brianc
Copy link
Owner

brianc commented Oct 3, 2013

Not sure about that warning - it's not related to node-postgres. Glad it's working for you!!

@brianc brianc closed this as completed Oct 3, 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