pg_config is a PostgreSQL executable package. Before installing the node pg module, you must ensure that it is installed first.
The reason for this is that the pg module really compiles the driver using pgsql tools and possibly C / C ++ code, so the node module uses node-gyp .
Read this article for more details: http://www.postgresql.org/docs/8.2/static/install-win32.html
You will see pg_config.exe in the list. Also, make sure pg_config.exe is in your PATH when reinstalling the pg node module. You can verify this by running pg_config.exe in the same current working directory, run npm install <module>
source share