Ooker
Ooker
DDeno
Created by Ooker on 4/4/2024 in #help
Why does `res.text()` not work inside `useEffect()`?
7 replies
DDeno
Created by Ooker on 4/4/2024 in #help
Why does `res.text()` not work inside `useEffect()`?
Thanks. Do you know how to fix this?
7 replies
DDeno
Created by Ooker on 4/4/2024 in #help
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):
https://quacau.deno.dev/kv?key=%C4%90u%C3%B4i+r%C3%BAt+g%E1%BB%8Dn%2CC1SHZ3
https://quacau.deno.dev/kv?key=%C4%90u%C3%B4i+r%C3%BAt+g%E1%BB%8Dn%2CC1SHZ3
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
DDeno
Created by Ooker on 4/4/2024 in #help
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
DDeno
Created by Ooker on 1/16/2024 in #help
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
7 replies
DDeno
Created by Ooker on 1/16/2024 in #help
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
if the path contains a space or a non-ASCII character then it yields this error:
Error: The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
Error: The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
I haven't figured out how to escape those characters.
7 replies
DDeno
Created by sergees on 1/27/2024 in #help
Using fresh inside an existing deno folder
In my case, if the path contains a space or a non-ASCII character then it yields this error:
Error: The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
Error: The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
I haven't figured out how to escape those characters.
6 replies
DDeno
Created by Ooker on 1/16/2024 in #help
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
anyone?
7 replies
DDeno
Created by Ooker on 1/16/2024 in #help
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
.github/workflows/deploy.yaml
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: main

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Build step
run: "deno task build" # 📝 Update the build command(s) if necessary

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "tranky" # 📝 Update the deploy project name if necessary
entrypoint: "./1/Web/main.ts" # 📝 Update the entrypoint if necessary
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: main

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Build step
run: "deno task build" # 📝 Update the build command(s) if necessary

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "tranky" # 📝 Update the deploy project name if necessary
entrypoint: "./1/Web/main.ts" # 📝 Update the entrypoint if necessary
7 replies
DDeno
Created by Ooker on 1/14/2024 in #help
How to send data from a child component to its sibling?
I think this is relevant
7 replies
DDeno
Created by Ooker on 1/14/2024 in #help
How to send data from a child component to its sibling?
7 replies
DDeno
Created by Ooker on 1/14/2024 in #help
How to send data from a child component to its sibling?
besides that, do you think the code should work?
7 replies
DDeno
Created by Ooker on 1/14/2024 in #help
How to send data from a child component to its sibling?
still not working
7 replies
DDeno
Created by Ooker on 1/11/2024 in #help
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:
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
},
"imports": {
"preact/": "https://esm.sh/preact@10.19.2/"
}
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
},
"imports": {
"preact/": "https://esm.sh/preact@10.19.2/"
}
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.ts(7026)
9 replies
DDeno
Created by Ooker on 1/11/2024 in #help
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements'
yes of course. My code works fine when it's in a separate project. All I do is to copy it to the bigger one
9 replies
DDeno
Created by Ooker on 1/11/2024 in #help
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements'
core/deno.json
{
"fmt": {
"files": {
"include": [],
"exclude": []
},
"options": {}
},
"lint": {
"files": {
"include": [],
"exclude": []
},
"rules": {
"tags": [],
"include": [],
"exclude": []
}
},
"tasks": {},
"test": {
"files": {
"include": [],
"exclude": []
}
},
"compilerOptions": {
"allowJs": true,
"strict": true
}
}
{
"fmt": {
"files": {
"include": [],
"exclude": []
},
"options": {}
},
"lint": {
"files": {
"include": [],
"exclude": []
},
"rules": {
"tags": [],
"include": [],
"exclude": []
}
},
"tasks": {},
"test": {
"files": {
"include": [],
"exclude": []
}
},
"compilerOptions": {
"allowJs": true,
"strict": true
}
}
9 replies
DDeno
Created by Ooker on 1/10/2024 in #help
How to pass value from one form to another?
nevermind, it's just that I didn't see the form due to not doing css
3 replies
DDeno
Created by Ooker on 1/8/2024 in #help
Slow loading time on localhost
I see. Thanks for your time
20 replies
DDeno
Created by Ooker on 1/8/2024 in #help
Slow loading time on localhost
you mean Ryan also was not familiar with gecko?
20 replies
DDeno
Created by Ooker on 1/8/2024 in #help
Slow loading time on localhost
ah I see
20 replies