NDH
NDH
DDeno
Created by MrGVSV on 11/10/2024 in #help
Access default TypeScript compiler options
2 replies
DDeno
Created by Bloxs on 10/27/2024 in #help
Running Fresh app on Windows with pm2
Just curious -- what is pm2? Ahh a process manager.
You may like pup https://github.com/Hexagon/pup
3 replies
DDeno
Created by 3Dxg on 10/26/2024 in #help
window install problem
That looks incorrect. the line
Deno was installed successfully to C:\Users\yadav.deno\bin\deno.exe
Deno was installed successfully to C:\Users\yadav.deno\bin\deno.exe
Should have been
Deno was installed successfully to C:\Users\yadav\.deno\bin\deno.exe
Deno was installed successfully to C:\Users\yadav\.deno\bin\deno.exe
Note the missing backslash between yadav and ,deno. Check that first path to see if it has a \bin folder in it.
If so something went wrong! Deno may have been added correctly in the path environment variable.
Please check your path environment variable.
in powershell enter $env:Path
It should contain:
C:\Users\yadav\.deno\bin
C:\Users\yadav\.deno\bin
If it does, Deno may have been installed accidentally in the folder:
C:\Users\yadav.deno\bin
C:\Users\yadav.deno\bin
rather than where it should be:
C:\Users\yadav\.deno\bin
C:\Users\yadav\.deno\bin
If so, I would report this as a bug.
11 replies
DDeno
Created by Nestum on 10/17/2024 in #help
Create a desktop app using Deno + Svelte with Compile
This was just now updated to fix Windows issue. Works great!
7 replies
DDeno
Created by fro.profesional on 1/21/2024 in #help
deno kv watch vs broadcast channel
Many moons ago -- pre KV -- I also used BroadcastChannel for webrtc signaling in Deploy for a multi-user dice game. It worked very well back then. I think post KV it was somehow crippled.
7 replies
DDeno
Created by Phatso on 8/12/2024 in #help
Importing local files (streaming large JSON files)
I've used this in my in-mem DB code.
// the hundredK.json file contains 100,000 user objects
// [
// [0,{"id":0,"value":{"id":0,"first":"Tough","last":"Republic","age":55}}],
// [1,{"id":1,"value":{"id":1,"first":"Impassioned","last":"Stock","age":10}}],
// ...
// ]
import * as largeJson from './hundredK.json' assert {type: 'json'};
type User = { id: number, first: string, last: string, age: number }
//@ts-ignore
const UserMap: Map<number, User> = new Map(largeJson.default)
console.log(UserMap.get(1))
console.log(UserMap.get(99990))

// To save the contents of the map to a file
Deno.writeTextFileSync("hundredKJson.json", JSON.stringify([...UserMap.entries()]))
// the hundredK.json file contains 100,000 user objects
// [
// [0,{"id":0,"value":{"id":0,"first":"Tough","last":"Republic","age":55}}],
// [1,{"id":1,"value":{"id":1,"first":"Impassioned","last":"Stock","age":10}}],
// ...
// ]
import * as largeJson from './hundredK.json' assert {type: 'json'};
type User = { id: number, first: string, last: string, age: number }
//@ts-ignore
const UserMap: Map<number, User> = new Map(largeJson.default)
console.log(UserMap.get(1))
console.log(UserMap.get(99990))

// To save the contents of the map to a file
Deno.writeTextFileSync("hundredKJson.json", JSON.stringify([...UserMap.entries()]))
6 replies
DDeno
Created by NDH on 4/10/2024 in #help
Deno Clean
@Deno AI Helper Does Deno add to, or modify the Windows Registry?
6 replies
DDeno
Created by NDH on 4/10/2024 in #help
Deno Clean
Thanks! How would I remove Deno.Kv files? What locations should I check?
6 replies
DDeno
Created by rzh9b on 1/16/2023 in #help
[react] document is not defined
Try adding the following to the top of that file:
/// <reference lib="dom" />
/// <reference lib="dom" />
This is how Fresh handles it, and how I write all client code in TS and then auto-esbuild it to a JS bundle.
18 replies
DDeno
Created by Evan on 3/20/2024 in #help
Tips for deploying Deno locally?
You may be interested in PUP. https://github.com/Hexagon/pup
5 replies
DDeno
Created by Pitanga on 3/17/2024 in #help
New fresh project comes out of the box with errors
Does that mean when using Tailwind you must AOT compile?
10 replies
DDeno
Created by Pitanga on 3/17/2024 in #help
New fresh project comes out of the box with errors
Wow, when did Fresh get a _nodemodules folder? And why?
10 replies
DDeno
Created by εvα on 3/12/2024 in #help
Error Installing Deno using PowerShell
I'd use : deno-x86_64-pc-windows-msvc.zip
9 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
@Deno AI Helper any help with this?
13 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
Also, you may want to try DAX -- written by a Deno core team member. https://github.com/dsherret/dax
13 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
Try asking the #Deno AI Helper
13 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
I was unable to spawn 'npm' Not sure why.
13 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
FYI many linux commands are just executables. In Windows, they are methods of the command processor.
13 replies
DDeno
Created by Shadow on 3/12/2024 in #help
Subprocess
For Windows. You need to execute. echo from a command processor -- "cmd"
const command = new Deno.Command("cmd", {
args: ["/c", "echo","hello world"],
stdin: "piped",
stdout: "piped"
}).spawn();

let result = await command.output();
const textDecoder = new TextDecoder();
console.log(textDecoder.decode(result.stdout));
const command = new Deno.Command("cmd", {
args: ["/c", "echo","hello world"],
stdin: "piped",
stdout: "piped"
}).spawn();

let result = await command.output();
const textDecoder = new TextDecoder();
console.log(textDecoder.decode(result.stdout));
13 replies
DDeno
Created by 177177177 on 3/9/2024 in #help
Make an image cropper that crops from data uri
6 replies