Leokuma
Leokuma
DDeno
Created by Cyan on 12/19/2024 in #help
How to set reuseaddr in `Deno.serve`?
Not sure. I'm unable to test it right now
6 replies
DDeno
Created by Cyan on 12/19/2024 in #help
How to set reuseaddr in `Deno.serve`?
IDK, but maybe because it probably doesn't work on Windows?
6 replies
DDeno
Created by Cyan on 12/19/2024 in #help
How to set reuseaddr in `Deno.serve`?
Deno.serve(
{reusePort: true},
() => new Response('hello')
)
Deno.serve(
{reusePort: true},
() => new Response('hello')
)
deno run -A --unstable-net
deno run -A --unstable-net
6 replies
DDeno
Created by callmephilip on 12/17/2024 in #help
Cannot access files inside package when running from jsr
If it's a simple init script that doesn't depend on an import map or deno.json, you can try to run it via HTTPS:
deno run https://jsr.io/@myorg/stuff/0.1.21/project-template/init.ts
deno run https://jsr.io/@myorg/stuff/0.1.21/project-template/init.ts
If it does depend on deno.json, I don't know how to make it work
3 replies
DDeno
Created by Robbie on 12/18/2024 in #help
Issues with importing from npm - should I switch to esm.sh?
Feel free to use esm.sh. Even the Deno Team recommends importing Preact from esm.sh for example
2 replies
DDeno
Created by qilp on 12/10/2024 in #help
Support implicit package imports?
What error do you get in Deno?
3 replies
DDeno
Created by Ben on 12/10/2024 in #help
Which logger do you use?
4 replies
DDeno
Created by Cyan on 12/11/2024 in #help
Error sending request too quick to npm
Maybe 2k requests in paralell is too much for Deno to handle? You could try to fetch 100 at a time Anyway, the error msg you're getting could be more clear
5 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
That was fast ⚡
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
maybe you've found a bug
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
but actually the docs say it's optional
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
like --allow-import=raw.githubusercontent.com
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
Maybe --allow-import requires that you provide a specific domain? https://docs.deno.com/runtime/fundamentals/security/#importing-from-the-web
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
Sorry I misread your question
17 replies
DDeno
Created by svet on 12/9/2024 in #help
Have a trouble using github hooks and deno
Try:
deno lint --rules-exclude=no-import,no-import-assertions,no-import-assign,no-sloppy-imports
deno lint --rules-exclude=no-import,no-import-assertions,no-import-assign,no-sloppy-imports
Also try:
deno lint --rules-include=allow-import
deno lint --rules-include=allow-import
17 replies
DDeno
Created by BOLL on 12/6/2024 in #help
Is it reasonable to import TypeScript source from Github instead of compiled NPM library? (Twurple)
I think it will be a pain to try to import the package you're talking about via Github. I have imported only very simple TS files from Github, via jsdelivr You can try to import it via esm.sh too, through a link similar to this: https://esm.sh/twurple@1.0.0/common
6 replies
DDeno
Created by cowboyd on 11/14/2024 in #help
Is there a way to read the current raw options for stdin?
Sorry, I forgot to answer I think there's no way to get the current state of stdin. You'll have to store the previous options somehow and then reassign them with setRaw() So if setRaw was false before, you reassign it to false: setRaw(false, options) But you could open an issue asking for a native way to retrieve that
8 replies
DDeno
Created by nounderline on 12/2/2024 in #help
How to exclude code and imports from deno compile binary?
Sorry, I wasn't aware that this behavior changed. I think it wasn't like that before But if you assign the filename to a variable, it doesn't get included:
const imp = './my-debug.ts';
await import(imp);
const imp = './my-debug.ts';
await import(imp);
Or this:
await import(import.meta.resolve('./my-debug.ts'));
await import(import.meta.resolve('./my-debug.ts'));
11 replies
DDeno
Created by Cyan on 12/3/2024 in #help
process.cpuUsage() is not implemented
Sorry, I'm not familiar with that. But you can ask in the PR
8 replies
DDeno
Created by nounderline on 12/2/2024 in #help
How to exclude code and imports from deno compile binary?
I dont think there's a "native" Deno way to do that You could try to use dynamic imports instead of static imports so that Deno only fetches them when they are called. If they are never called in production, they will never be fetched I'm not sure what the behavior is with JSR, but another possible strategy would be to have 2 jsr.json or 2 deno.json, one for dev and another for production. You can also consider having 2 entrypoints to your app, like main.ts and dev.ts. I'm not sure if any of those would work for you, though
11 replies