-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Describe the bug
Attempting to install Deno fails immediately:
❯ curl -sL https://deno.land/install.sh | sh
curl: socket hang up
Inspecting network traffic for the browser document via DevTools reveals that the first issue is a CORS issue:
Access to fetch at 'https://deno.land/install.sh' from origin 'https://something.w-credentialless-staticblitz.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I then tried pasting the contents of https://deno.land/install.sh into a file and running it directly:
❯ sh install.sh
install.sh: line 7: unsupported shell syntax
For reference (and as the install.sh script might change with time), here is line 7:
if ! command -v unzip >/dev/null && ! command -v 7z >/dev/null; then
The shell (/bin/jsh
/) appears to have limited functionality but as Stackblitz supports Node.js it seems to me that supporting Deno should also be feasible.
Does this require some specific work on Stackblitz's side to support Deno? (I'm sure folks would like Bun too.)
Link to the blitz that caused the error
https://stackblitz.com/~/github.com/denoland/std
Steps to reproduce
- Open a repo.
- Create a file named install.sh.
- Copy the content from https://deno.land/install.sh and paste them into install.sh.
- Run
sh install.sh
Expected behavior
Deno is successfully installed.
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
Version = 1.84.0
Hash = 3b0b7194bc6b567c2eaf4c96a5759098469dcf59
WebContainer = d3acb9e1
Browser name = Chrome
Full version = 131.0.0.0
Major version = 131
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 88494600,
"usedJSHeapSize": 80563792,
"jsHeapSizeLimit": 4294705152
}
Additional context
An alternative to supporting Deno installation would be for it to be installed out-of-the-box like Node.js is. This might be simpler in some ways but I'd want a way to specify which Deno version to load.