dependabot / dependabot-core

🤖 Dependabot's core logic for creating update PRs.
https://docs.github.com/en/code-security/dependabot
MIT License
4.66k stars 1.01k forks source link

Dependabot::SharedHelpers::HelperSubprocessFailed:  ERR_PNPM_UNSUPPORTED_PLATFORM  Unsupported platform for registry.npmjs.org/@swc/core-darwin-x64/... #9321

Closed sentry-io[bot] closed 3 months ago

sentry-io[bot] commented 6 months ago

Sentry Issue: DELTAFORCE-YYW

Dependabot::SharedHelpers::HelperSubprocessFailed:  ERR_PNPM_UNSUPPORTED_PLATFORM  Unsupported platform for registry.npmjs.org/@swc/core-darwin-x64/1.4.8: wanted {"cpu":["x64"],"os":["darwin"],"libc":["any"]} (current: {"os":"linux","cpu":"x64","libc":"glibc"})

This error happened while installing a direct dependency of /home/dependabot/dependabot-updater/repo
Progress: resolved 1, reused 0, downloaded 0, added 0
  common/lib/dependabot/shared_helpers.rb:429:in `run_shell_command'
  dependabot-updater/vendor/ruby/3.1.0/gems/sorbet-runtime-0.5.11193/lib/types/private/methods/call_validation.rb:169:in `bind_call'
  dependabot-updater/vendor/ruby/3.1.0/gems/sorbet-runtime-0.5.11193/lib/types/private/methods/call_validation.rb:169:in `validate_call_skip_block_type'
  dependabot-updater/vendor/ruby/3.1.0/gems/sorbet-runtime-0.5.11193/lib/types/private/methods/call_validation.rb:111:in `block in create_validator_slow_skip_block_type'
  npm_and_yarn/lib/dependabot/npm_and_yarn/helpers.rb:171:in `run_pnpm_command'
...
(56 additional frame(s) were not displayed)
abdulapopoola commented 6 months ago

See repro here

pboling commented 5 months ago
  proxy | 2024/04/17 16:25:28 [035] GET https://registry.npmjs.org:443/pnpm
  proxy | 2024/04/17 16:25:28 [035] 200 https://registry.npmjs.org:443/pnpm
  proxy | 2024/04/17 16:25:28 [035] WARN: Cannot write TLS response header from mitm'd client: write tcp 192.168.1.1:1080->192.168.1.2:58940: write: broken pipe
updater | 2024/04/17 16:25:28 ERROR <job_816158862> Error processing prettier-plugin-tailwindcss (Dependabot::SharedHelpers::HelperSubprocessFailed)
updater | 2024/04/17 16:25:28 ERROR <job_816158862>  ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)
updater | 
updater | Your pnpm version is incompatible with "/home/dependabot/dependabot-updater/repo".
updater | 
updater | Expected version: ^8.15.7
updater | Got: 8.15.5
updater | 
updater | This is happening because the package's manifest has an engines.pnpm field specified.
updater | To fix this issue, install the required pnpm version globally.
updater | 
updater | To install the latest version of pnpm, run "pnpm i -g pnpm".
updater | To check your pnpm version, run "pnpm -v".

What on earth? All references to pnpm in my repository are in sync, and pegged to current release, which is 8.15.7. Why is dependabot requiring 8.15.5? Does using dependabot force a specific version of pnpm on a project? That would be patently ridiculous.

abdulapopoola commented 3 months ago

This should be fixed now by @deivid-rodriguez 's fix; closing as resolved.