johnlindquist / kit

Script Kit. Automate Anything.
https://scriptkit.com
MIT License
3.91k stars 138 forks source link

initial setup hang on downloading nodejs #1290

Closed crazyxhz closed 1 year ago

crazyxhz commented 1 year ago
image

initial setup hang on downloading nodejs but I can download nodejs using this link directly

image

btw, i have nodejs in my path, is this download necessary?

johnlindquist commented 1 year ago

Hmm, are you running on a VPN or anything that might block it?

There's also this workaround which may help:

https://github.com/johnlindquist/kit/discussions/1052

crazyxhz commented 1 year ago

Hmm, are you running on a VPN or anything that might block it?

There's also this workaround which may help:

1052

till hang on the download...

image

can the process using the system proxy setting? I found that i can download the link using proxy. But fail to download if the proxy is not set.

crazyxhz commented 1 year ago

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 wget https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz

is working

johnlindquist commented 1 year ago

@crazyxhz Give me 15 minutes and I'll try to add proxy support to the install-kit script

johnlindquist commented 1 year ago

@crazyxhz Alright, added this logic to grab proxy info from the env vars:

https://github.com/johnlindquist/install-kit/blob/main/download-node.js#L58

Can you try npx @johnlindquist/install-kit@latest again?

crazyxhz commented 1 year ago

1052

download succeed. but there is an error as follows (my system nodejs is 18.16.0 which is using npx 8.19.3, can kit using the system nodejs?)

---- Write Settings ----
{ version: '1.76.10' }

---- Examples ----
file:///Users/admin/.npm/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/globals/dist/index.js:36
const path$a=require$$1$1,util$3=require$$1,isNaturalNumber=isNatural
[long js file omitted]

TypeError: Cannot read properties of undefined (reading 'MAX_LENGTH')
    at o (file:///Users/admin/.npm/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/globals/dist/index.js:36:119197)
    at file:///Users/admin/.npm/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/globals/dist/index.js:36:119318
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.13.0
johnlindquist commented 1 year ago

@crazyxhz Can you try the app I published today? It should check for https_proxy env vars and use them during setup

crazyxhz commented 1 year ago

@johnlindquist it worked. Thank you for the quick repair