Deno

D

Deno

Chat about Deno, a modern runtime for JavaScript and TypeScript.

Join

Checking for circular module dependencies?

Hi, I’m wondering if there is some way to detect whether there are circular dependencies in a set of modules. Ideally, it might look something like this: ```js let detectCircularDependencies = fileNames => { … } ...

List of all deno.land packages?

Is there a list somewhere of all the deno.land packages on one page?

Safety measures (statically, not runtime) for libraries that require environment variables?

Suppose I have a Deno library which expects certain environment variables to have been configured, otherwise a crash will happen. Does anyone know of a good way to somehow ensure at "compile-time" that whatever Deno application is using the library has configured these environment variables?

Deno debugging failure: Argument 0 must be a buffer source

I have TWO Deno project with and cannot use the debugger with ONE of them. One project debugs fine, the other does not. I do not know where to start to mitigate the problem. I see this problem with VS Code fronting the debugger and by using chrome://inspect directly. First, the error message:...

VSCode "quick fix" for missing import doesn't use import map

When adding a missing import via option + Enter, it will suggest the full URL, despite that URL being in my import map. After accepting the suggestion, it'll suggest to change the import to use the value in the import map instead. Can this be configured to be one operation instead of two?

Testing my Oak `Application` end-to-end

I have an Oak application, and I'd like to test the main const app = new Application() configuration, making sure e.g. that all the routes are being found, etc. I've only been able to find createMockContext, etc., but I can't figure out how to make a "mock server request" that would be accepted by Application.handle basically?...

Adding methods to Oak's Context?

I am trying to figure out how to configure my Oak application/router so that my routes can do things like ctx.customMethod(), could someone point me in the right direction? I can only really find how to customize the State, but that would only let me do ctx.state.customMethod() – is that how you're supposed to do it instead of what I had in mind?

Clear cache modules

Hello guys, I would like to know how can I remove unnecessary modules from cache? I've run - deno cache --reload=npm: main.ts
- deno cache --reload main.ts ...

How does importing `node:https` work?

Basically, how does it work? Does the machine need to have a Node.js environment installed for this?

`await import()` without global execution

Hello there. This is some code from my test.ts:```ts // test.ts console.log("Hello World"); export const say_hi = ()=>console.log("hi");...

HTTPS custom cert passphrase in Deno?

I have this code from a Node.js project, and I'm trying to figure out if there's any alternative in Deno today: ```ts const config = { method: "post",...

Increase http server timeout?

How do i increase the timeout? Seems to be ~120 seconds by default, but we have longer running requests than that.

Is inspecting import.meta.url a reliable way to distinguish browser and deno contexts?

I have been trying to figure out a good pattern to import JSON that will work whether called in deno or the browser. This is what I was thinking: ```js let data ...

npm package, need to use deno websocket if running in deno

Anyone has any idea how to use native deno websocket with my npm package? Detecting deno is not a problem. (normal websocket from npm is broken in deno.)...

Fetching Twitter data with coroutines and puppeteer

are there any recent examples of how to fetch Twitter data (like monitoring activity for a keyword everyday) without using Twitter paid API and without getting blocked ? In Deno of course.

Custom JSX transform from local module

Is it possible to define a JSX transform within the same codebase? All of the examples show referencing it from a remote module like https:/esm.sh/preact I've tried this, but it is unable to load my local jsx-runtime module because it doesn't recognize it as bing JS or TS. https://github.com/cowboyd/deno-jsx...

Pathname prefix in serve()

Hi, I was wondering if it's possible to only handle requests coming from specific prefix within pathname like: localhost:8000/api I'm using std serve....

embed typescript playground to web page

some programming language guides like the rust book lets you directly edit and run code in their docs, would it be possible for deno to do this in client-side? i'm planning to create a blog in deno and being able to run code snippets inside posts would be helpful. https://doc.rust-lang.org/book/ch01-02-hello-world.html...

Using deno-lambda for AWS SAM

I'm having issues trying to run deno-lambda (https://github.com/hayd/deno-lambda) locally. (I haven't tried running it on AWS for real yet.)
Init failed error=fork/exec /var/task/bootstrap: no such file or directory InvokeID=
My main module filename is main.ts and it exports a handler function which I think should work. Here is how I build and run everything:...

How to monetize an app?

I would like to monetize my apps in a certain way. Mabye limit some features. How to approach monetization?