Skip to content

Pipelines fail with SyntaxError: Unexpected token #22

@gaggle

Description

@gaggle

Hi, we see occasional failed pipelines because, well, something goes wrong in pnpm/action-setup:

Running self-installer...
  [stdin]:1
  <HTML>
  ^
  SyntaxError: Unexpected token '<'
      at new Script (vm.js:84:7)
      at createScript (vm.js:258:10)
      at Object.runInThisContext (vm.js:306:10)
      at Object.<anonymous> ([stdin]-wrapper:9:26)
      at Module._compile (internal/modules/cjs/loader.js:959:30)
      at evalScript (internal/process/execution.js:80:25)
      at internal/main/eval_stdin.js:29:5
      at Socket.<anonymous> (internal/process/execution.js:192:5)
      at Socket.emit (events.js:215:7)
      at endReadableNT (_stream_readable.js:1184:12)
Error: Something does wrong, self-installer exits with code 1
Installation Completed!
Running pnpm recursive install --frozen-lockfile
Error: Command pnpm recursive install --frozen-lockfile (cwd: undefined) exits with status 127

I'm not sure if it's this line const response = await fetch('https://pnpm.js.org/pnpm.js') that might fail? If it somehow gets an HTML response? So if pnpm.js.org fails to return the pnpm.js script for a splitsecond, instead returning an HTML error page, then that could happen?

Will maintainers consider a retry mechanism to increase resilience? If the request is the cause of this error then an exponential backoff could work well, to try a couple times before giving up. WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions