Deno

D

Deno

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

Join

Typescript intelisense between jupyter notebooks

I've been trying to run jupyter notebooks with deno, but I've noticed that if I create a variable in one block and try to use it in another, I get a typescirpt error: Cannot find name 'x'. It doesn't really matter because if I run them, everything works as it should. But still, is this a vscode lsp problem? Or deno kernel? Or maybe I'm just setting something up wrong XD. I'm running it on wsl, so maybe it's a deal-breaker.
No description

how to compress string into string

How would i go about compressing a string? i need to compress a string but i need the compressed value to also be a string or be able to be turned into a string

Fresh - Page title to Layout

Hi, I have been browsing around the docs and also being new to JSX,I'm not sure what I look for. What I want todo is have a variable in the title tag of my _layout. So I can pass that var via the page.

When I use deno run I get this error: error : Permission denied (os error 13)

When I use deno run I get this error: error : Permission denied (os error 13) (for '/Users/apple/Library/Caches/deno/deps/https/fresh.deno.dev/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1')

Axios HttpsProxyAgent

Hello, I tryed to search but found nothing. I'm using axios with httpProxyAgent to proxy my outgoing requests and with node everything works correctly, when running with deno it uses my ip instead of proxy ip, how can i fix it? maybe i should use fetch with proxy?

Get input from an island, make calculus then render ?

I have a route with 2 islands inside - one to get input from user - one to render data Once I've got the user input, I retrieve data, make some calculus and want to render (charts for example)...

Using SCSS with Fresh

Hi, I'm starting to get into Fresh for building simple static websites. Right now I want to use my preferred tool, SASS(scss). Can I intergrate this directly with Fresh? Or do I need to do this separately?...

Has anyone used React Material UI with Deno Fresh? Is this possible and also what are the componenet

Has anyone used React Material UI with Deno Fresh? Is this possible and also what are the componenet libraries you use with fresh?

JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements'

I have a core program, and from that I have auxiliary components: test, web app, cli app. Initially I worked on the core + cli app + test, then recently I work on the web app with Fresh. At first I separate the project to learn the framework easier, but now I want to join them together, so that I can debug the core easier. Now every component has this problem:
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.deno-ts(7026)
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.deno-ts(7026)
I've tried restarted VS Code but it doesn't help. Here are some related files:...

Using Deno.Command to run tailwindcss with watch flag not working

If I do new Deno.Command(Deno.execPath(), {args:["run", "-A", "npm:tailwindcss", "-i", "./styles.css", "-o", "./public/styles.css", "--watch"]}), no watching happens and the output file doesn't get updated. The npm package running doesn't seem to get the watch argument or the output anymore. But if I run npx tailwindcss -i ./styles.css -o ./public/styles.css --watch, It updates the file and watches for changes based on the tailwind.config.js. Is this expected or am I doing something wrong? I'm just trying to spawn a process to do the same as npx. Should I just use "npx" instead of Deno.execPath()?...

ESBuild SASS Plugin

Hey, I have developed this Plugin: https://github.com/DenoPlayground/esbuild-plugin-sass But I have some problems with the import paths from the SASS module. Maybe someone can help me to debug this, since ESBuild does not have an official community server....

Can't spawn a shell properly using Deno!

```ts const bash = (() => { const bashProc = spawn("bash"); bashProc.stdout.on("data", (data: string) => {...

How to optimize imports on deno deploy?

I have a medium project (44 files) deployed on deno deploy, where works. But, I'm getting inconsistent and sometimes very long cold start times in my deno project, like the attached image. All my dependencies:...
No description

LSP complains about missing package mongodb

VS Code keeps complaining about "uncached or missing npm package: mongodb". Cache "npm:mongodb" and it's dependencies Quick fix action does not help, neither does deno cache --reload npm:mongodb. The script works flawlessly with deno run, it's just VSCode/LSP that does seem to struggle with the package. There seem to be a lot of identical related entries in the Deno LSP output: Could not set npm package requirements. Error getting response at https://registry.npmjs.org/encoding for package "encoding": An npm specifier not found in cache: "encoding", --cached-only is specified. (for example attempting to cache npm:mongodb via Quick fix makes the LSP print out these)...
No description

node.js to Deno remix template migration

I would like to migrate one of the templates in remix from node.js to Deno. I am not sure how to do it. this is the template i am using https://github.com/remix-run/indie-stack/tree/main. And this is what the deno template look like. https://github.com/remix-run/remix/tree/main/templates/deno. I dont know where to start

How to pass value from one form to another?

I want to design a form which has two input text field. What users type in field 1 will be passed to field 2. How can I do this in Deno Fresh? Here is the current code, suggested from https://discord.com/channels/684898665143206084/991511118524715139/1194335634228256828 routes/index.tsx: ```typescript...

How to build a Response object with the 'url' property set

Writing unit tests. Some functions parse Response objects. How do I create some where the url property isn't an empty string? Crafting statusText and headers to mimick a server response from a certain host doesn't seem to work....

Why Deno is not a library?

For example, I'd like to embed JavaScript (Deno) on FreeBasic or Rust to able Users to write JavaScript code within my app. So, Why Deno is not a library?

`deno cache` consistently failing with the same error

error: error sending request for url (https://deno.land/std@0.152.0/http/negotiation.ts): dispatch task is gone: runtime dropped the dispatch task It's not always the negotiation file, sometimes it's other dependencies also from deno.land/std that's running into the issue. Any clues on how to fix this?...