问题描述
通过腾讯的edgeone构建会出现如下问题
复现步骤
pnpm install --frozen-lockfile
实际的行为
16:09:58.015
.../esbuild@0.27.1/node_modules/esbuild postinstall$ node install.js
16:09:58.017
.../node_modules/simple-git-hooks postinstall$ node ./postinstall.js
16:09:58.099
.../esbuild@0.25.12/node_modules/esbuild postinstall$ node install.js
16:09:58.244
.../libpq@1.8.15/node_modules/libpq install$ node-gyp rebuild
16:09:58.606
.../esbuild@0.18.20/node_modules/esbuild postinstall$ node install.js
16:09:59.510
.../esbuild@0.27.1/node_modules/esbuild postinstall: Done
16:09:59.902
.../esbuild@0.25.11/node_modules/esbuild postinstall$ node install.js
16:10:00.001
.../esbuild@0.25.12/node_modules/esbuild postinstall: Done
16:10:00.140
.../esbuild@0.18.20/node_modules/esbuild postinstall: Done
16:10:00.512
.../libpq@1.8.15/node_modules/libpq install: gyp info it worked if it ends with ok
16:10:00.513
.../libpq@1.8.15/node_modules/libpq install: gyp info using node-gyp@11.5.0
16:10:00.514
.../libpq@1.8.15/node_modules/libpq install: gyp info using node@22.17.1 | linux | x64
16:10:00.624
.../node_modules/simple-git-hooks postinstall: [INFO] Successfully set the pre-commit with command: pnpm exec lint-staged
16:10:01.074
.../esbuild@0.25.11/node_modules/esbuild postinstall: Done
16:10:03.361
.../node_modules/simple-git-hooks postinstall: Done
16:10:05.804
.../libpq@1.8.15/node_modules/libpq install: gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
16:10:08.648
.../libpq@1.8.15/node_modules/libpq install: gyp http GET https://nodejs.org/download/release/v22.17.1/node-v22.17.1-headers.tar.gz
16:10:08.788
.../libpq@1.8.15/node_modules/libpq install: gyp http 200 https://nodejs.org/download/release/v22.17.1/node-v22.17.1-headers.tar.gz
16:10:24.541
.../libpq@1.8.15/node_modules/libpq install: gyp http GET https://nodejs.org/download/release/v22.17.1/SHASUMS256.txt
16:10:24.584
.../libpq@1.8.15/node_modules/libpq install: gyp http 200 https://nodejs.org/download/release/v22.17.1/SHASUMS256.txt
16:10:28.456
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn /usr/bin/python3
16:10:28.459
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args [
16:10:28.460
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
16:10:28.461
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args 'binding.gyp',
16:10:28.464
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-f',
16:10:28.464
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args 'make',
16:10:28.464
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-I',
16:10:28.464
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/libpq@1.8.15/node_modules/libpq/build/config.gypi',
16:10:28.464
16:10:28.465
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
16:10:28.465
16:10:28.468
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '/dev/shm/home/.cache/node-gyp/22.17.1/include/node/common.gypi',
16:10:28.468
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dlibrary=shared_library',
16:10:28.468
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dvisibility=default',
16:10:28.468
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dnode_root_dir=/dev/shm/home/.cache/node-gyp/22.17.1',
16:10:28.468
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dnode_gyp_dir=/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node_modules/node-gyp',
16:10:28.470
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dnode_lib_file=/dev/shm/home/.cache/node-gyp/22.17.1/<(target_arch)/node.lib',
16:10:28.470
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dmodule_root_dir=/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/libpq@1.8.15/node_modules/libpq',
16:10:28.470
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Dnode_engine=v8',
16:10:28.470
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '--depth=.',
16:10:28.472
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '--no-parallel',
16:10:28.472
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '--generator-output',
16:10:28.472
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args 'build',
16:10:28.472
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args '-Goutput_dir=.'
16:10:28.472
.../libpq@1.8.15/node_modules/libpq install: gyp info spawn args ]
16:10:29.792
.../libpq@1.8.15/node_modules/libpq install: which: no pg_config in (/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/libpq@1.8.15/node_modules/libpq/node_modules/.bin:/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/libpq@1.8.15/node_modules/.bin:/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.bin:/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node-gyp-bin:/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/node_modules/.bin:/dev/shm/repo/afilmory-fktk6b5fji/node_modules/.bin:/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/bin:/usr/local/bin:/tmp/home/.pyenv/plugins/pyenv-virtualenv/shims:/tmp/home/.pyenv/shims:/tmp/home/.pyenv/bin:/tmp/home/.local/state/fnm_multishells/5_1767600511205/bin:/tmp/home/.local/share/fnm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
16:10:29.839
.../libpq@1.8.15/node_modules/libpq install: find: ‘/usr/pg*’: No such file or directory
16:10:29.841
.../libpq@1.8.15/node_modules/libpq install: gyp: Call to 'which pg_config || find /usr/bin /usr/local/bin /usr/pg* /opt -executable -name pg_config -print -quit' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
16:10:29.861
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! configure error
16:10:29.861
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! stack Error: `gyp` failed with exit code: 1
16:10:29.862
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! stack at ChildProcess.<anonymous> (/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node_modules/node-gyp/lib/configure.js:317:18)
16:10:29.862
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! stack at ChildProcess.emit (node:events:518:28)
16:10:29.862
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! System Linux 6.6.69-cube.pvm.guest.dev-gc77c5b507bef
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! command "/tmp/home/.local/share/fnm/node-versions/v22.17.1/installation/bin/node" "/dev/shm/home/.local/share/pnpm/.tools/pnpm/10.26.2/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! cwd /dev/shm/repo/afilmory-fktk6b5fji/node_modules/.pnpm/libpq@1.8.15/node_modules/libpq
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! node -v v22.17.1
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! node-gyp -v v11.5.0
16:10:29.863
.../libpq@1.8.15/node_modules/libpq install: gyp ERR! not ok
16:10:29.882
.../libpq@1.8.15/node_modules/libpq install: Failed
16:10:29.956
ELIFECYCLE Command failed with exit code 1.
16:10:30.140
[builder] "pnpm install --frozen-lockfile" execute time: 103238ms
16:10:30.140
[builder] "pnpm install --frozen-lockfile" failed, exit code: 1
16:10:30.141
Options:
16:10:30.141
-v, --version Show version [boolean]
16:10:30.141
--external Comma-separated list of packages to externalize (e.g., argon2,bcrypt) [string] [default: ""]
16:10:30.141
-h, --help, --help Show help [boolean]
16:10:30.151
Error: Command failed with code 1
16:10:30.151
at ChildProcess.<anonymous> (/tmp/home/.local/share/fnm/node-versions/v22.11.0/installation/lib/node_modules/edgeone/edgeone-dist/cli.js:3320:3064)
16:10:30.152
at ChildProcess.emit (node:events:518:28)
16:10:30.152
at maybeClose (node:internal/child_process:1101:16)
16:10:30.152
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
16:10:34.321
16:10:34.323
16:10:34.323
Build error
请问一定需要pg_config吗?
问题描述
通过腾讯的
edgeone构建会出现如下问题复现步骤
pnpm install --frozen-lockfile实际的行为
请问一定需要
pg_config吗?