Open gzsig opened 4 months ago
I encountered an error when attempting to use the pg-dump-restore library to dump a PostgreSQL database. The process fails with an ENOENT error for the pg_dump command.
pg-dump-restore
ENOENT
pg_dump
{ 'full error :>> ': Error: Command failed with ENOENT: pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql spawn pg_dump ENOENT at __node_internal_captureLargerStackTrace (node:internal/errors:496:5) at __node_internal_errnoException (node:internal/errors:623:12) at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -2, code: 'ENOENT', syscall: 'spawn pg_dump', path: 'pg_dump', spawnargs: [ '--dbname=postgresql://postgres:sudo@localhost:5432/testeprod', '--format=custom', '--file=./dump.sql' ], originalMessage: 'spawn pg_dump ENOENT', shortMessage: 'Command failed with ENOENT: pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql\n' + 'spawn pg_dump ENOENT', command: 'pg_dump --dbname=postgresql://postgres:sudo@localhost:5432/testeprod --format=custom --file=./dump.sql', escapedCommand: 'pg_dump "--dbname=postgresql://postgres:sudo@localhost:5432/testeprod" "--format=custom" "--file=./dump.sql"', exitCode: undefined, signal: undefined, signalDescription: undefined, stdout: '', stderr: '', failed: true, timedOut: false, isCanceled: false, killed: false } }
The library should successfully initiate a dump of the specified PostgreSQL database using pg_dump.
The command fails with an ENOENT error, indicating that pg_dump could not be found or executed.
You need to install libpq using brew. brew install libpq
libpq
brew install libpq
After that, you will need to do this brew link --force libpq
brew link --force libpq
I encountered an error when attempting to use the
pg-dump-restore
library to dump a PostgreSQL database. The process fails with anENOENT
error for thepg_dump
command.Error Message
Steps to Reproduce
pg-dump-restore
via yarn.Expected Behavior
The library should successfully initiate a dump of the specified PostgreSQL database using
pg_dump
.Actual Behavior
The command fails with an
ENOENT
error, indicating thatpg_dump
could not be found or executed.Environment