Ooker
Why does `res.text()` not work inside `useEffect()`?
I ask this question because I have the same problem when trying to POST to this endpoint (the app is also mine):
I create the API by using denoland/kv_api
I follow Dealing with CORS | Fresh docs but none of the script solves that. Why is that?
7 replies
Why does `res.text()` not work inside `useEffect()`?
interesting. I turnoff the error log in my browser console, so I didn't see that. I also don't see the error is there in the server console. MDN says:
CORS failures result in errors but for security reasons, specifics about the error are not available to JavaScript. All the code knows is that an error occurred. The only way to determine what specifically went wrong is to look at the browser's console for details.What are those security reasons?
7 replies
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
7 replies
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements'
It turns out that VS Code can recognize the
deno.json
file in the root folder, not the component¹ folder (i.e. ./aux/web/deno.json
). The file also have to have at least these line:
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.ts(7026)9 replies