OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Issue installing pg-native dependency

  • Thread starter Thread starter Chippy
  • Start date Start date
C

Chippy

Guest
I'm currently struggling with installing the pg-native dependency to my project folder. When I try to run my index.js, it says it cannot "resolve the dependency pg-native" though I don't believe I call it. However, assuming that I do, I tried to install the dependency and get this error screen when I try to:

Code:
C:\Users\jmurr\Documents\MSDPP-Map>npm i pg-native

> [email protected] install C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq
> node-gyp rebuild


C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq>if not defined npm_config_node_gyp (node "C:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
'pg_config' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'pg_config --libdir' returned exit status 1 while in binding.gyp. 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:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jmurr\\AppData\\Roaming\\nvm\\v8.11.4\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jmurr\AppData\Roaming\npm-cache\_logs\2019-11-14T02_44_05_069Z-debug.log

I tried my best to set everything up properly before installing as noted under the Windows section here: https://www.npmjs.com/package/pg-native. However, it still does not work. I might've done one of the things incorrectly and am hoping that somebody here can help with the frustrations I've been having the past couple of days trying to figure this out. Thank you for your time!

<p>I'm currently struggling with installing the pg-native dependency to my project folder. When I try to run my index.js, it says it cannot "resolve the dependency pg-native" though I don't believe I call it. However, assuming that I do, I tried to install the dependency and get this error screen when I try to:</p>

<pre><code>C:\Users\jmurr\Documents\MSDPP-Map>npm i pg-native

> [email protected] install C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq
> node-gyp rebuild


C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq>if not defined npm_config_node_gyp (node "C:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
'pg_config' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'pg_config --libdir' returned exit status 1 while in binding.gyp. 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:\Users\jmurr\AppData\Roaming\nvm\v8.11.4\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jmurr\\AppData\\Roaming\\nvm\\v8.11.4\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jmurr\Documents\MSDPP-Map\node_modules\libpq
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jmurr\AppData\Roaming\npm-cache\_logs\2019-11-14T02_44_05_069Z-debug.log
</code></pre>

<p>I tried my best to set everything up properly before installing as noted under the Windows section here: <a href="https://www.npmjs.com/package/pg-native" rel="nofollow noreferrer">https://www.npmjs.com/package/pg-native</a>. However, it still does not work. I might've done one of the things incorrectly and am hoping that somebody here can help with the frustrations I've been having the past couple of days trying to figure this out. Thank you for your time!</p>
 

Latest posts

P
Replies
0
Views
1
Paul Gilmartin
P

Online statistics

Members online
0
Guests online
2
Total visitors
2
Ads by Eonads
Top