简体   繁体   中英

Can anyone please guide me on whats going on when I run this script? What am i missing and how can I fix it?

Im trying to run this in cmd and I keep getting this error,

C:\Users\Vrosario\Downloads\roboape-main\roboape-main>npm install
npm ERR! code 1
npm ERR! path C:\Users\Vrosario\Downloads\roboape-main\roboape-main\node_modules\libpq
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.17.5 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.6 found at "C:\Users\Vrosario\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.31613.86) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Vrosario\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Users\\Vrosario\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Vrosario\\Downloads\\roboape-main\\roboape-main\\node_modules\\libpq\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Vrosario\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\Vrosario\\AppData\\Local\\node-gyp\\Cache\\14.17.5\\include\\node\\common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Vrosario\\AppData\\Local\\node-gyp\\Cache\\14.17.5',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Vrosario\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Vrosario\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.17.5\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Vrosario\\Downloads\\roboape-main\\roboape-main\\node_modules\\libpq',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'C:\\Users\\Vrosario\\Downloads\\roboape-main\\roboape-main\\node_modules\\libpq\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! 'pg_config' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! gyp: Call to 'pg_config --libdir' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\Vrosario\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Vrosario\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Vrosario\Downloads\roboape-main\roboape-main\node_modules\libpq
npm ERR! gyp ERR! node -v v14.17.5
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Vrosario\AppData\Local\npm-cache\_logs\2021-08-23T20_38_50_620Z-debug.log
enter code here

You need to install Postgres binaries onto your PATH.

Your error is 'pg_config' is not recognized as an internal or external command, operable program or batch file

https://www.postgresql.org/docs/13/app-pgconfig.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM