如何检查我的电脑是否正确安装了 Deno?
How to check Deno installed correctly in my computer?
我使用 iwr https://deno.land/x/install/install.ps1 -useb | iex
这个命令安装了 Deno。我使用
检查了安装
deno --version
这个命令,即使在我的 visual studio 代码终端中,我 运行 deno --version
它工作正常,但是如果我开始 运行 我的 .js
文件,它不起作用,这是我的
这里出了什么问题? , 谢谢!!!
Deno 已正确安装,如您所见 运行 deno --version
。
您的脚本无法运行,因为这是版本 1.0.3
中引入的已知错误,请尝试更新到最新的 Deno 版本,1.0.5
或降级到 1.0.0
看到这个问题:https://github.com/denoland/deno/issues/6022
根据您选择的版本,您必须使用不同版本的 Oak
而不是从 master 拉取,这被认为是一种不好的做法。
对于 1.0.0
你必须使用 Oak 4.0.0
import { Application } from 'https://deno.land/x/oak@v4.0.0/mod.ts'
I see the console output, but if I open localhost:3000 , this is not
working
在 windows 上,您可能必须将 127.0.0.1/localhost
用作 hostname
。
app.listen({ hostname: '127.0.0.1', port })
参见:
我使用 iwr https://deno.land/x/install/install.ps1 -useb | iex
这个命令安装了 Deno。我使用
deno --version
这个命令,即使在我的 visual studio 代码终端中,我 运行 deno --version
它工作正常,但是如果我开始 运行 我的 .js
文件,它不起作用,这是我的
Deno 已正确安装,如您所见 运行 deno --version
。
您的脚本无法运行,因为这是版本 1.0.3
中引入的已知错误,请尝试更新到最新的 Deno 版本,1.0.5
或降级到 1.0.0
看到这个问题:https://github.com/denoland/deno/issues/6022
根据您选择的版本,您必须使用不同版本的 Oak
而不是从 master 拉取,这被认为是一种不好的做法。
对于 1.0.0
你必须使用 Oak 4.0.0
import { Application } from 'https://deno.land/x/oak@v4.0.0/mod.ts'
I see the console output, but if I open localhost:3000 , this is not working
在 windows 上,您可能必须将 127.0.0.1/localhost
用作 hostname
。
app.listen({ hostname: '127.0.0.1', port })
参见: