Reputation: 4416
I installed Deno using iwr https://deno.land/x/install/install.ps1 -useb | iex
this command. I checked installation using:
deno --version
this command, even though, in my visual studio code Terminal, I run deno --version
it's working properly, but if I start to run my .js
File, it is not working.
Upvotes: 1
Views: 1293
Reputation: 40434
Deno is installed correctly as you can see by running deno --version
.
Your script is not working because that's a known bug introduced in version 1.0.3
, try updating to the latest Deno version, 1.0.5
or downgrading to 1.0.0
See this issue: https://github.com/denoland/deno/issues/6022
Depending on what version you choose, you'll have to use a different version of Oak
instead of pulling from master, which is considered a bad practice.
For 1.0.0
you'll have to use Oak 4.0.0
import { Application } from 'https://deno.land/x/[email protected]/mod.ts'
I see the console output, but if I open localhost:3000 , this is not working
On windows you may have to use 127.0.0.1/localhost
as hostname
.
app.listen({ hostname: '127.0.0.1', port })
See: https://stackoverflow.com/a/61953863/1119863
Upvotes: 1