Closed aminya closed 2 years ago
I'm getting the same error.
I guess that in the logs it tries to parse the html syntax, and why would pnpm have to do that ?
It seems it fetches pnpm from 'https://pnpm.js.org/pnpm.js' and tries to parse the result.
The JS file is not minified; its size is 4.3 MB
! No surprise if it fails due to network issues.
Same here https://github.com/ankurk91/google-chat-electron/runs/6605847171?check_suite_focus=true
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.1
with:
version: 7.x.x
Looks like https://pnpm.js.org/pnpm.js
is returning HTML instead of JS?
I ended up using this flow now
- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install pnpm
run: npm install -g pnpm@^7
https://pnpm.js.org/ is protected by Cloudflare, so my best (and only) guess is that the IPs GitHub is using for its macOS runners got ratelimited, and so what we're getting is Cloudflare's blocked page or its CAPTCHA page.
We don't fetch from pnpm.js.org
Well, all right, but it looks like https://get.pnpm.io/ is behind Cloudflare too, so I'm still betting it's the same thing.
I am not sure. I have enabled caching for get.pnpm.io, so I don't think it would rate limit anything.
one workaround is to use setup-node
twice, and npm i -g pnpm
. You can even parse packageManager field with jq
example: https://github.com/sveltejs/vite-plugin-svelte/blob/main/.github/workflows/ci.yml#L27-L35
The solution for fixing this action is including pnpms install.sh in this repo and not relying on downloads from pnpm.io as discussed here https://github.com/pnpm/action-setup/issues/22
:ship: 2.2.2
Now, it fails on Ubuntu 18.04 https://github.com/aminya/setup-cpp/runs/7125419782?check_suite_focus=true#step:5:9
Run pnpm/action-setup@v2
Running self-installer...
[stdin]:1
<!DOCTYPE html>
^
SyntaxError: Unexpected token '<'
at new Script (vm.js:88:7)
at createScript (vm.js:2[6](https://github.com/aminya/setup-cpp/runs/7125419782?check_suite_focus=true#step:5:7)1:10)
at Object.runInThisContext (vm.js:309:10)
at Object.<anonymous> ([stdin]-wrapper:10:26)
Error: Something went wrong, self-installer exits with code 1
Installation Completed!
at Module._compile (internal/modules/cjs/loader.js:999:30)
at evalScript (internal/process/execution.js:94:25)
at internal/main/eval_stdin.js:29:5
at Socket.<anonymous> (internal/process/execution.js:20[7](https://github.com/aminya/setup-cpp/runs/7125419782?check_suite_focus=true#step:5:8):5)
at Socket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:[12](https://github.com/aminya/setup-cpp/runs/7125419782?check_suite_focus=true#step:5:13)41:12)
The action fails on MacOS 11 https://github.com/aminya/setup-cpp/runs/6601627749?check_suite_focus=true#step:5:1