EGamalielGZ
document is not defined error while testing preact hooks
Currently I'm developing a preact hooks library. When I try to run a simple test using
deno test
, it throws me the next error:
Here is the code of the test I'm doing and the deno.json
at root and workspace
Code:
deno.json (root)
deno.json (workspace)
7 replies
Error only happens when I'm on deno deploy
Please can someone explain why with my web application when deployed in deno deploy I get this response and error when trying to login but not when I login locally?
Response:
Response {
body: ReadableStream { locked: false },
bodyUsed: false,
headers: Headers {
"content-length": "98",
"content-type": "text/plain; charset=utf-8",
date: "Fri, 06 Oct 2023 03:51:17 GMT",
server: "deno/gcp-us-south1",
via: "http/1.1 edgeproxy"
},
ok: false,
redirected: false,
status: 508,
statusText: "Loop Detected",
url: "https://roomhome.deno.dev/api/auth/client/login"
}
Error:
An error occurred during route handling or page rendering. SyntaxError: Unexpected non-whitespace character after JSON at position 3 (line 1 column 4)
at parse (<anonymous>)
at packageData (ext:deno_fetch/22_body.js:369:14)
at consumeBody (ext:deno_fetch/22_body.js:246:12)
at eventLoopTick (ext:core/01_core.js:183:11)
at async POST (file:///src/routes/login.tsx:40:32)
at async handler (file:///src/routes/_middleware.ts:32:14)
at async handler (https://deno.land/x/fresh@1.4.
Repo:
https://github.com/EGAMAGZ/RoomHome
15 replies
Help, does the middleware example in the Deno Fresh documentation not work for anyone else?
I tried to follow the example in Deno Fresh about middlewares, but it doesn't work, the content
ctx.state.data
doesn't appears to be undefined whatever I do3 replies
How to setup deno for Lunarvim?
I've followed the steps to install the LSP for deno, but the completion and formatter doesn't work
https://lunarvim.org/docs/languages/typescript
4 replies