denoland / deno_install Goto Github PK
View Code? Open in Web Editor NEWDeno Binary Installer
Home Page: https://deno.land/
Deno Binary Installer
Home Page: https://deno.land/
This is the error message I've got from CI. Something went wrong with the server.
$ #!/bin/bash -eo pipefail
curl -fsSL https://deno.land/x/install/install.sh | sh
curl: (22) The requested URL returned error: 503 Service Unavailable
Exited with code 22
I ran the installer on my computer, got this:
pi@raspberrypi:~ $ deno --help
bash: /home/pi/.deno/bin/deno: cannot execute binary file: Exec format error
PS C:\files\ iwr https://deno.land/x/install/install.ps1 | iex
iex : Parameter cannot be processed because the parameter name 'Out' is ambiguous. Possible matches include:
-OutFile -OutVariable -OutBuffer.
At line:1 char:47
+ iwr https://deno.land/x/install/install.ps1 | iex
+ ~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-Expression], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.InvokeExpressionCommand
sh
installer on osx
sh
installer with different shells (ksh
, zsh
, dash
, bash
, and sh
)pwsh
installer is cross-platform, add win
, osx
and linux
testssh
installer is cross-platform, add win
testSince both curl
and python
aren't pre-installed on Windows, curl -sSf https://raw.githubusercontent.com/denoland/deno_install/master/install.py | python
is not a very convenient way to install deno
.
Creating a proper .msi
or .exe
installer is probably too much work at the moment. However, adding deno
to a Windows package manager is fairly easy.
As far as I know, there are two major package managers for Windows: Chocolatey and Scoop.
Since scoop
is more actively maintained than choco
, arguably easier to use, and focused on developer tools, I decided to make a PR for adding deno
to scoop
. Since it has already been merged, deno
can be installed with scoop install deno
on Windows.
I think in future, there should be multiple options for users to install deno
on Windows:
deno.exe
filedeno.zip
filedeno-setup.exe
filepowershell.exe
: iex (iwr https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1)
(see: denoland/deno_install/#4)pwsh.exe
: iex (iwr https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1)
scoop install deno
(see: lukesampson/scoop/#2570)choco install deno
npm install deno
If you have a prior version of Deno installed, it would be cool to upgrade using this:
> deno https://deno.land/x/install/install.ts
See https://github.com/denoland/deno/blob/v0.37.1/.github/workflows/ci.yml#L196-L204
We're using LLVM target triples in the filenames now.
Hello! Thanks for an interesting project.
When I try to install Deno as the main website tells me, I get an error:
PS C:\Users\zitro> iwr https://deno.land/x/install/install.ps1 | iex
iwr : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ iwr https://deno.land/x/install/install.ps1 | iex
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Latest Windows 10 / Subsystem for Linux off.
I tryied to run the installer on my mac and I get the following error:
Traceback (most recent call last):
File "<stdin>", line 92, in <module>
File "<stdin>", line 53, in main
File "<stdin>", line 38, in release_url
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
MacOS version: 10.12.6
Python version: 2.7.10
The install script makes the assumption that unzip is available. It is not available by default in WSL and probably other environments. Ideally the script would check for this before downloading deno.
It would then prompt the user to install unzip with apt and exit.
Whenever I try to run
curl -L https://deno.land/x/install/install.py | python
I get the following along with the executable not appearing under ~/.deno/bin/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 3089 100 3089 0 0 8423 0 --:--:-- --:--:-- --:--:-- 45426
Unable to find release page for None
I am on a Mac running version 10.14.1
The Deno website mentions the following installation option:
Using Homebrew (macOS or Linux):
But when I try to install it using brew install deno
I see the following error message:
deno: macOS is required.
Error: An unsatisfied requirement failed this build.
Is the website outdated or should this work? ๐
iex (iwr https://deno.land/x/install/install.ps1)
iex
doesn't work with param
. See https://ci.appveyor.com/project/MarkTiedemann/win-ci-playground/builds/21844216.
So apparently this installation method hasn't worked since #22.
This is easy to fix, luckily:
if ($args.Count -gt 0) {
$Version = $args.Get(0)
}
I already tested it, and it works: https://ci.appveyor.com/project/MarkTiedemann/win-ci-playground/builds/21844766.
Will make a PR for it tomorrow and also add proper end-to-end tests for that.
iwr https://deno.land/x/install/install.ps1 -useb | iex
as instructed on Deno websiteError text: "iex : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again."
cmd --version
results with Version 10.0.18362.720
Since denoland/deno@e782ba1 deno now stores cache files in platform dependent cache directories like $HOME/Library/Caches
(mac).
Downloading the deno binary into $HOME/.deno/bin
seems now inappropriate.
Where should it be installed?
Travis seems failing since this build with the following error:
$ ./install_test.ps1
Invoke-ScriptAnalyzer : The 'Invoke-ScriptAnalyzer' command was found in the module 'PSScriptAnalyzer', but the module could not be loaded. For more information, run 'Import-Module PSScriptAnalyzer'.
At /home/travis/build/denoland/deno_install/install_test.ps1:18 char:1
+ Invoke-ScriptAnalyzer *.ps1 -EnableExit -Exclude PSAvoidAssignmentToA ...
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Invoke-ScriptAnalyzer:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
The command "./install_test.ps1" exited with 1.
To fix broken builds.
asdf
is a popular tool that helps a bit with the management of the languages (which brew
doesn't give us a good solution for it, at least in MacOS)
Would be nice to have an asdf
plugin for managing Deno
PowerShell 6.1.0
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS C:\Users\Gocsss> iex (iwr https://raw.githubusercontent.com/denoland/deno_insta
ll/master/install.ps1)
Downloading https://api.github.com/repos/denoland/deno/releases/latest... done.
Determining latest Deno release: v0.1.8... done.
Downloading https://github.com/denoland/deno/releases/download/v0.1.8/deno_win_x
64.zip...Invoke-WebRequest : Unable to read data from the transport connection:
An existing connection was forcibly closed by the remote host.
At line:45 char:1
+ Invoke-WebRequest -Uri $download_uri -OutFile $zip_file
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.In
vokeWebRequestCommand
This might be related to this stackoverflow question.
Since there's already a Python, a PowerShell, soon a Deno, and perhaps a Bash install script, we might want to:
PS C:\Users\zhang> iex (iwr https://deno.land/x/install/install.ps1)
iex : Method invocation failed because [System.__ComObject] does not contain a method named 'IHTMLDocument2_write'.
At line:1 char:1
+ iex (iwr https://deno.land/x/install/install.ps1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (IHTMLDocument2_write:String) [Invoke-Expression], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound,Microsoft.PowerShell.Commands.InvokeExpressionCommand
Hi, first of all, thank you for this awesome project to Ryan and all contributors. You rocks guys!
Now that Deno has been reached a stable status, I think is time to make a new web (like Node is working on).
I'm not so good as designer but I can support as developer. So, maybe there is a UI/UX guy that could help with the design. It would be great.
What do you think?
PD: Sorry for open the issue in this repo. I didn't realize that is not the main one.
https://deno.land/x/install/install.ps1
redirects to https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1
:
$ curl -I https://deno.land/x/install/install.ps1 | grep Location:
Location: https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1
deno.land
does not work with TLS 1.0.
$ curl --tls-max 1.2 https://deno.land/x/install/install.ps1
$ curl --tls-max 1.0 https://deno.land/x/install/install.ps1
-curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
However, raw.githubusercontent.com
works fine with TLS 1.0.
$ curl --tls-max 1.2 https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1
$ curl --tls-max 1.0 https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1
There have been a number of issues because PowerShell <v6 uses TLS 1.0 by default.
For example:
The default PowerShell version for Windows 8 is v4, for Windows 10 it is v5. So this impacts nearly all PowerShell users.
The following fixes are possible:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://deno.land/x/install/install.ps1 | iex
iwr https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1 | iex
deno.land
cc @ry
I'm using Windows NT 10 15063
Building the app is quite a sassle for me (as win32 users) because:
By the way, I have very limited resources; RAM, CPU even Storage
Needed requirements
I think anyone with the listed above resources .
can build it NOW and send it because I think it is not a difficult task and
I'm not even trying to go into node and I NEED it desperately. PLEASE HELP.
Now that we have a shell one, which has fewer deps than the python, and now that all the documentation has been updated to point at install.sh, we should remove the python installer.
I'm on Windows (using git bash) so this doesn't work
I can alter the command so the reference is correct but it turns out the curl install just isn't formatted for windows:
'/c/Users/John Vandivier/.local/bin/deno' --help
-> Exec format err
If the intent is windows users shouldn't install via curl and must use chocolatey, plz clarify that on the website which currently implies that either would work:
https://deno.land/
see:
https://deno.land/x/install/install.ps1#L54
https://deno.land/x/install/install.ps1#L58
https://deno.land/x/install/install.ps1#L70
vs
https://github.com/denoland/deno_install/blob/master/install.ps1#L54-L70
this messes up highlighting for the rest of the file, making it harder to read than a plain text
I just tried updating from 0.35 to 0.38 using the script. This is what happens in the terminal:
$ which deno
/home/daniel/.local/bin/deno
$ deno --version
deno 0.35.0
v8 8.1.310
typescript 3.8.2
$ curl -fsSL https://deno.land/x/install/install.sh | sh
######################################################################## 100.0%
Archive: /home/daniel/.local/bin/deno.zip
replace deno? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
(EOF or read error, treating as "[N]one" ...)
$ uname -a
Linux hostname 4.4.0-176-generic #206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
That EOF or read error
happens immediately; it doesn't seem like there's a chance for me to do anything.
Solved by removing the existing deno binary first.
Install deno
via apt
on Debian/Ubuntu
EG curl -sSf https://raw.githubusercontent.com/denoland/deno_install/master/install.py v0.1.12 | python
In would be reasonable to give users the opportunity to easily install deno on macOs using brew formula.
I need to run commands in deno without saving them in file, so I use piping. Even though it has few weird things (such as returning undefined at the end), it works well. The only thing is when I try to import module, it doesn't work. Is there a way to fix that?
I'm on a Win10 machine and I followed the Powershell installation step. The error message said "the IE engine is not available". I confirmed that I do have IE installed on the machine.
How can I check and fix this?
PS H:\> iwr https://deno.land/x/install/install.ps1 | iex
iwr : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet
Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
At line:1 char:1
+ iwr https://deno.land/x/install/install.ps1 | iex
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
+ FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman
d
Thank you!
I'm very much a noob when it comes to internet protocol stuff, and I was just trying to install Deno on a server that only has an IPv6 address:
$ curl -fsSL https://deno.land/x/install/install.sh | sh
curl: (7) Failed to connect to deno.land port 443: Connection timed out
Is this expected behavior?
I guess npm would be the most familiar way for Node developers to install Deno.
So how about a simple postinstall
script in the package.json
so you can run npm install deno
to install Deno into $HOME/.deno/bin
?
npmjs.com/deno is already taken by a "Bridge to deno" package that only has a README so far, but we could ask the author of that package to transfer ownership.
The TypeScript declaration files could be published in the package, too.
If we did that, editors that don't know about Deno, but that do understand TypeScript and auto-download declaration files for code-completion from npm (for example, VS Code), would make it very convenient to get started: You would just have to create a my-script.ts
file, open it in your editor, type import * as deno from 'deno'
, and the editor would give you auto-complete, so you could type deno.en
, hit tab, deno.env()
would be auto-completed, and you could hover over deno.env()
with your mouse to read the docs ... That would be very convenient. :)
System: Ubuntu 18.04
Deno Version: v0.10.0 / 2019.06.25
tried to install deno from my home dir (it has a folder "sh" in it), so:
(23) Failed writing body
(pwd now: ~/sh)
does it have smth to do with /bin/sh ?
(re)installing from another folder works normally
Since there's a .sh
installer now, might be worth it to make it work on the Linux subsystem for Windows, too.
Perhaps even MinGW and similar.
Not quite sure which CI options there are to ensure this is properly tested.
deno: A full installation of Xcode.app 10.0 is required to compile
this software. Installing just the Command Line Tools is not sufficient.
Seems that the url changed:
curl -fsSL https://deno.land/x/install/install.sh | sh -s v0.3.9
-#O#- # #
curl: (22) The requested URL returned error: 404 Not Found
I just tried running the shell command from the README:
curl -fsSL https://deno.land/x/install/install.sh | sh
And go the error:
curl: (6) Could not resolve host: deno.land
Any clues as to what I am doing wrong?
The following issue shows up when trying to install on Windows 10.
iwr : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:6
+ iex (iwr https://deno.land/x/install/install.ps1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
You need to do first do the following command in your powershell.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
This command is present on line 7 of the install.ps1 script, but the script errors out before it reaches this line. Because this needs to be set to establish a connection and when you try to connect to "set the command", you already run into the Tls11 issue.
Maybe its better to update the documentation? Or have a batch file that the user download, where this command is set first, before the iex command is run.
This was experienced in deno_std CI
##[section]Starting: PowerShell
==============================================================================
Task : PowerShell
Description : Run a PowerShell script on Linux, macOS, or Windows
Version : 2.151.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
##[command]"C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\f19fe38a-bd1a-4e5d-a15f-a4eeb59e2c28.ps1'"
iwr : The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.
At D:\a\_temp\f19fe38a-bd1a-4e5d-a15f-a4eeb59e2c28.ps1:2 char:1
+ iwr https://deno.land/x/install/install.ps1 -out install.ps1; .\insta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], InvalidDataException
+ FullyQualifiedErrorId : System.IO.InvalidDataException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
##[error]PowerShell exited with code '1'.
##[section]Finishing: PowerShell
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.