Deno

D

Deno

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

Join

How to use Deno modules in Vite app (Vue specifically)

I scaffolded an app using https://docs.deno.com/runtime/tutorials/how_to_with_npm/vue#run-npmcreate-vite-extra. I'm trying to use the SurrealDB package inside Vue but stumbling upon an error:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/typescript". Strict MIME type checking is enforced for module scripts per HTML spec.
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/typescript". Strict MIME type checking is enforced for module scripts per HTML spec.
...

deno_bindgen release 9.0

@divy When is it coming? I've been waiting for a while for release 9.0... Is there any work going on? I've been out for a while as I had board exams thinking it'll be released by the eding of the exam....

Is it possible to connect to Deno KV from the browser?

I'm intrigued by the premise of Deno KV, but I'm having trouble understanding how it currently works. It's possible to access KV from Node on the server using the new Node package, but is it also possible to securely access KV directly from the browser, using a framework other than Fresh? Being able to do this would reduce the amount of code needed to add realtime functionality to my app significantly.

Deno AI Assistant - How Are You Built?

I'm interested to learn the architecture behind the Deno AI assistant. 1. What model(s) are used? 2. What Database is used? 3. Which deno packages are used? 4. Are there recommended tutorials on building something similar to the Deno AI Assistant?...

Embedding all of deno in Rust?

So, I know that you can use deno_core to roll a javascript runtime in Rust and use that, and use it with your own api and whatnot. But what if you want to be able to leverage already created deno libraries, but in your Rust program? Think of it as a sort of plugin system in your Rust app that can leverage all of deno's api (including packages)...

Fresh project next to regular Deno project

Hey, I have a question about adding a fresh project next to a regular Deno project. I have the following setup, with the global deno.json sitting in the root directory ``` - .vscode...

Astro 4.0 Support

Hi there, just wanted to check in if someone from the Deno org could review the PR on the official Deno + Astro adapter? It looks like it's been sitting for a couple of weeks now and is blocking people from using the latest version of Astro. Thank you as always! https://github.com/denoland/deno-astro-adapter/pull/11...

import { Eta } from "https://deno.land/x/eta@v3.0.3/src/index.ts" results in error

Error message: "error trying to connect: invalid peer certificate: NotValidYet." Is there a problem with the SSL certificate?

A syantax error which I can not decode

I have attached 2 screenshots, describing the issue, i am using this api: https://docs.abstractapi.com/scrape Someone please tell what is the syntax error here...
No description

deno-core adding 40mb overhead

We recently migrated to deno-core from mini_v8 and realized a major increase in the size of the release build. Our core runtime is around 12Mb, on which we expected a 20mb increase because of V8, however with deno core we get around an additional 20mb increase in build size, reaching a total of around 50mb. Anyway we can reduce this? Link to our work: https://github.com/tailcallhq/tailcall/pull/1088/files...

Getting errors while using puppeteer in deno environment

Here is my code(supabase edge function index.ts): ```import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts"; Deno.serve(async (req) => {...
No description

Non-ascii characters not showing in subject field using Deno SMTP

When using the smtp library non-ascii characters show up fine in the body. But if included in the header they simply disappear.

Default Lint Rules

Is there a list of the lint rules that are applied by default. When I look at the documentation it mentions all of the recommended rules. I'm migrating some node code, and would like to apply the same rules in node, before I migrate the code to Deno, as that will reduce any friction, and I seem to have some relaxed typing here and there which I'd like to resolve, then migrate....

Errors with mocking & testing in supabase edge function running on deno.

Hi everyone - I am sincerely hoping you can save me from pulling out all my hair with this. At my company we're using supabase, and want to use edge-functions, setting up this part was relatively quick and easy; however, I'm a test-fanatic, and I believe that nothing in our system should go without testing. Meaning, every edge function should have a decent test-coverage, this INCLUDES mocks/spies/stubs/fakes. The way supabase presents their testing docs, they assume we're always running on database, querying directly on a DB. However, good practices is to mock out our calls and return dummy data to assert whether the system can be proven to be robust in different situations....

Errors Deploying Fresh Project

I am new to Deno and working through the Fresh tutorial. I have reached the deployment section: https://fresh.deno.dev/docs/getting-started/deploy-to-production I get to the point where I get the “Finish setting up Fresh” page which instructs me to modify the .github/workflows/deploy.yml file to set the correct Project Name....

Run all test in sub-folder

Hey guys - day one deno newby here. Incredibly inspired by what I've been able to achieve on my first day. I just can't believe how fast tests execute. It's as though they complete as my finger barely leaves the mouse, using VS CODE test runner. I am definitely looking forward to a more integrated test-debug experience. So far I can't get the debugger config to hit a breakpoint. One thing I am unclear on, having admittedly just skimmed the documentation, is how to run all tests in subfolders, from the command line....

Read source code content

Is there a way to read the current source code of the a given a file URL (using import.meta.url) without re-downloading it? I know that inside $DENO_DIR or cache directories there are the content of the already downloaded files, but I suppose they are content-addressable somehow (sha1, maybe?). I have a code that generates a schema based on types definitions but currently I need to download them all again because I can't leverage the deno cache....

Danet create is stuck at database

What am I supposed to do to choose postgres?
No description

Working around imports without a file extension

I'm facing an apparent contradiction between the requirements for importing modules, and the import statements generated by jsx compilation. The deno module docs cleary state that imports must explicitly specify a file extension:
It adopts browser-like module resolution, meaning that file names must be specified in full. You may not omit the file extension and there is no special handling of index.js....

deno runtime extensions seems to be not working

the example provided here https://github.com/denoland/deno/tree/main/runtime/examples/extension_with_esm seems to be not working. when the js file is executed, i get an error Error: TypeError: Deno[Deno.internal].core.opSync is not a function. what changed, i am able to register an extension with JsRuntime directly but not through workerOptions. wondering how to fix this. How do we access the extension ops from the js side in the latest version?...