BOLL
BOLL
DDeno
Created by BOLL on 11/24/2024 in #help
FileServer from tutorial, 2000+ ms to connect?
I finally tried this, and with the local IP it works super 😄 I would probably never have figured this out, so big thanks 🤣
6 replies
DDeno
Created by BOLL on 11/24/2024 in #help
FileServer from tutorial, 2000+ ms to connect?
Yes, windows! I'll do this when I get home, didn't have energy yesterday to debug much after bumping into this. Header values all looked OK so I was a bit out of ideas. 😅
6 replies
DDeno
Created by BOLL on 11/24/2024 in #help
FileServer from tutorial, 2000+ ms to connect?
It seems when the page has been cached, it loads quickly, which is unsurprising. But whenever forcing a refresh it gets this timing back. I'll try a different browser too. Oh... the issue is only in Firefox... I shall investigate.
6 replies
DDeno
Created by BOLL on 11/24/2024 in #help
FileServer from tutorial, 2000+ ms to connect?
Deno.serve(
{hostname: 'localhost', port: this._options.port},
(request) => {
return serveDir(request, {fsRoot: '../web/dist'})
}
)
Deno.serve(
{hostname: 'localhost', port: this._options.port},
(request) => {
return serveDir(request, {fsRoot: '../web/dist'})
}
)
Simplified it to this to remove all of my own logic, but it still has the same timing... 🥹
6 replies
DDeno
Created by BOLL on 11/3/2024 in #help
Possible to use Deno.test for callbacks?
Due to the randomness I also made a resolve function that counted up so I could wait for both the server and client to finish shutting down before resolving, all done now 😄
7 replies
DDeno
Created by BOLL on 11/3/2024 in #help
Possible to use Deno.test for callbacks?
Awesome, with this I can even shut down both the server and client so the sanitize options are no longer needed, wohoo 😄
7 replies
DDeno
Created by BOLL on 11/3/2024 in #help
Possible to use Deno.test for callbacks?
I wrote this thread before lunch running on fumes, that was clear as I thought of this very solution while eating 🤣 Thanks for giving me an example to work with!
7 replies
DDeno
Created by BOLL on 10/21/2024 in #help
Run Fresh in subfolder with root deno.json
I did what was mentioned in the guide and closed the issue, will mark this as solved too 😛 will give up on splitting things in workspaces and just run it all through one config, it will hopefully keep me sane 🤣
7 replies
DDeno
Created by BOLL on 10/21/2024 in #help
Run Fresh in subfolder with root deno.json
Ah, the difference to what I did was to move the whole Fresh config file to the root. I specifically wanted to split up the imports so started with a fresh config in the root and tried to move over as few parts as possible while retaining the config in the Fresh folder. I'm just home for a short while to look at this but will be back tonight. (Sweden)
7 replies
DDeno
Created by BOLL on 10/21/2024 in #help
Run Fresh in subfolder with root deno.json
Posted an issue on the repo, because why not. I'm starting to think this is just not possible to do right now, so I should just give up and put everything in the Fresh folder and be done with it.
7 replies
DDeno
Created by BOLL on 10/21/2024 in #help
Run Fresh in subfolder with root deno.json
The first error when putting Fresh in a workspace:
error: Relative import path "preact" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/preact-render-to-string@6.3.1/X-ZS8q/denonext/preact-render-to-string.mjs"
at https://esm.sh/v135/preact-render-to-string@6.3.1/X-ZS8q/denonext/preact-render-to-string.mjs:2:46
error: Relative import path "preact" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/preact-render-to-string@6.3.1/X-ZS8q/denonext/preact-render-to-string.mjs"
at https://esm.sh/v135/preact-render-to-string@6.3.1/X-ZS8q/denonext/preact-render-to-string.mjs:2:46
And the other error when I move the imports to the root config:
error: Uncaught (in promise) Error: deno.json must contain an 'importMap' or 'imports' property.
throw new Error(
^
at getInternalFreshState (https://deno.land/x/fresh@1.7.3/src/server/config.ts:53:11)
at eventLoopTick (ext:core/01_core.js:175:7)
at async dev (https://deno.land/x/fresh@1.7.3/src/dev/dev_command.ts:51:19)
at async file:///D:/apps/desbot_wip/server/dev.ts:10:1
error: Uncaught (in promise) Error: deno.json must contain an 'importMap' or 'imports' property.
throw new Error(
^
at getInternalFreshState (https://deno.land/x/fresh@1.7.3/src/server/config.ts:53:11)
at eventLoopTick (ext:core/01_core.js:175:7)
at async dev (https://deno.land/x/fresh@1.7.3/src/dev/dev_command.ts:51:19)
at async file:///D:/apps/desbot_wip/server/dev.ts:10:1
7 replies
DDeno
Created by BOLL on 10/20/2024 in #help
Deno workspaces and Fresh, a viable combination?
Turns out I do need to have the deno.json file in the root after all, else my formatting is not applied, possibly compile settings as well, on folders outside the server subfolder.
4 replies
DDeno
Created by BOLL on 10/20/2024 in #help
Deno workspaces and Fresh, a viable combination?
Right, I should have tested this from the start, but it appears as if the deno.json inside the server folder still works with the code that resides outside that folder. Still not sure if all the compile options will be true for the language server when I edit stuff in the other folders, but I hope so. I'll mark this as solved as I doubt anyone will drop by with any other information 🤣 And I'll skip using workspaces entirely as the alias feature only makes things worse for now.
4 replies
DDeno
Created by BOLL on 10/20/2024 in #help
Deno workspaces and Fresh, a viable combination?
Been experimenting with workspaces now. Some observations: 1. When using an alias, like: @scope/myfunc it turns out at least in WebStorm, there is no reference to the source file anymore, it becomes a local reference that cannot be followed outside of the current file, even if the code runs and gets the doc-comment. This makes aliases less useful. 2. The above is also true when the workspace export points to an index.ts file that re-exports the contents of that workspace. One of the main reasons I had to use workspaces was the alias feature, but due to this difference in how it works in the IDE I'll avoid using it. Is this up to JetBrains? Are they solely responsible for how the Deno plugin in their IDEs work, or is there a collaboration?
4 replies