jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Tools: Jetpack Install fails with cryptic message when PHP version is wrong

Open gogdzl opened this issue 9 months ago • 3 comments

When PHP's version is incompatible with jetpack install we get the following message:

 pnpm jetpack install
✔ What type of project are you working on today? · plugins
✔ Please choose which project · crm
  ⠹ Installing pnpm dependencies
  ✖ Installing composer dependencies for plugins/crm
    → Command failed with exit code 2: composer install
Error: Command failed with exit code 2: composer install
    at makeError (file:///home/gogdzl/dsk/git/avengers/jetpack/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///home/gogdzl/dsk/git/avengers/jetpack/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:119:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  shortMessage: 'Command failed with exit code 2: composer install',
  command: 'composer install',
  escapedCommand: 'composer install',
  exitCode: 2,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  context: [Object: null prototype] {}
}

Environment:

 composer --version
Composer version 2.7.6 2024-05-04 23:03:15
PHP version 8.3.7 (/usr/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.

By downgrading PHP everything runs smoothly.

gogdzl avatar May 23 '24 21:05 gogdzl