ivandpf
ivandpf11mo ago

Starting project errors

I have error in url of Deno
No description
19 Replies
NeTT
NeTT11mo 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
ivandpfOP11mo ago
No description
ivandpf
ivandpfOP11mo ago
Red too. And I reopen vs code.
ivandpf
ivandpfOP11mo ago
I try to install denon and no works
No description
ivandpf
ivandpfOP11mo ago
Why that have a lot of problems
NeTT
NeTT11mo ago
NeTT
NeTT11mo ago
the command palette can be opened with ctrl+shift+p
ivandpf
ivandpfOP11mo ago
Leokuma
Leokuma11mo ago
How did you install Deno?
ivandpf
ivandpfOP11mo ago
Chocolatey
akumaruь
akumaruь11mo ago
try enabling deno for current workspace sorry for offtopic quesiton, but what did you use for recordin it?
ivandpf
ivandpfOP11mo ago
How
akumaruь
akumaruь11mo ago
type Enable instead of cache
ivandpf
ivandpfOP11mo ago
Thanks works. And that error?
No description
akumaruь
akumaruь11mo 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
ivandpfOP11mo ago
Yes but I want routes
akumaruь
akumaruь11mo 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
ivandpfOP11mo ago
Thank youuu.
NeTT
NeTT11mo ago
snipping tool

Did you find this page helpful?