Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm building a nodejs application that needs to run on a Windows server. I've managed to get almost everything working, but I've ran into a problem with the postgresql driver. BrianC has a pure javascript implementation of the node-postgres that I would like to use to avoid having to build the postgres driver.

Is there a way for me to alias node-postgres(npm:pg) to node-postgres-pure(npm:pg.js) so that any dependent package that tries to install and resolve pg will install and resolve pg.js instead?

Thanks

share|improve this question
    
I am facing the same issue on my WIndows-based workstation with using Sequelize with pg. I had node-gyp issues, then msbuild issues, trying to get pg installed. Have you found a resolution? –  alphadogg Jan 30 '14 at 0:24

1 Answer 1

Take a look at node-pg-pure-alias.

It's a bit of a hack, but the idea is to get a package that calls itself 'pg' installed into your node_modules folder. Then, that 'pg' library can export the "real" library.

See #it's not in npm! if you're concerned about depending on a package that's not in the official npm repository.

Disclaimer: I created node-pg-pure-alias. (All ten lines of the package.json, that is.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.