ivandpf
ivandpf8mo ago

Starting project errors

I have error in url of Deno
No description
19 Replies
NeTT
NeTT8mo ago
it's coz of two reasons: 1. The URL was prolly not cached yet 2. You haven't specified a version in the URL so it will implicitly fetch the latest version of the lib the first issue will be gone with a cache dependencies command the second, try using an explicit version like https://deno.land/x/oak@v13.2.5/mod.ts
ivandpf
ivandpf8mo ago
No description
ivandpf
ivandpf8mo ago
Red too. And I reopen vs code.
ivandpf
ivandpf8mo ago
I try to install denon and no works
No description
ivandpf
ivandpf8mo ago
Why that have a lot of problems
NeTT
NeTT8mo ago
NeTT
NeTT8mo ago
the command palette can be opened with ctrl+shift+p
ivandpf
ivandpf8mo ago
Leokuma
Leokuma8mo ago
How did you install Deno?
ivandpf
ivandpf8mo ago
Chocolatey
akumaruь
akumaruь8mo ago
try enabling deno for current workspace sorry for offtopic quesiton, but what did you use for recordin it?
ivandpf
ivandpf8mo ago
How
akumaruь
akumaruь8mo ago
type Enable instead of cache
ivandpf
ivandpf8mo ago
Thanks works. And that error?
No description
akumaruь
akumaruь8mo ago
i don't think it's a valid code
import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
ctx.response.body = "Hello World!";
});

await app.listen({ port: 8000 });
import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
ctx.response.body = "Hello World!";
});

await app.listen({ port: 8000 });
from official docs https://deno.land/x/oak@v13.2.5
ivandpf
ivandpf8mo ago
Yes but I want routes
akumaruь
akumaruь8mo ago
import { Application, Router } from "https://deno.land/x/oak/mod.ts";

const router = new Router();
router
.get("/", (context) => {
context.response.body = "Hello world!";
})

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({ port: 8000 }
import { Application, Router } from "https://deno.land/x/oak/mod.ts";

const router = new Router();
router
.get("/", (context) => {
context.response.body = "Hello world!";
})

const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());

await app.listen({ port: 8000 }
ivandpf
ivandpf8mo ago
Thank youuu.
NeTT
NeTT8mo ago
snipping tool