©TriMoon™
©TriMoon™
Explore posts from servers
DDeno
Created by ©TriMoon™ on 2/14/2025 in #help
globalThis woes with VSCode Deno extensions LSP
PS: My use-case at moment is pure browser
11 replies
DDeno
Created by ©TriMoon™ on 2/14/2025 in #help
globalThis woes with VSCode Deno extensions LSP
Like i said the code works, but deno's LSP is having PMS with my usage...
11 replies
DDeno
Created by ©TriMoon™ on 2/14/2025 in #help
globalThis woes with VSCode Deno extensions LSP
This is needed so that other code can check for existance of globalThis.debug to perform special actions during debugging and skip those when not... something like this
globalThis.debug?.somefunction() && ....
globalThis.debug?.somefunction() && ....
11 replies
DDeno
Created by ©TriMoon™ on 2/14/2025 in #help
globalThis woes with VSCode Deno extensions LSP
If you noticed, i am explicitly creating a entry on globalThis with an instance of this class on use inside the constructor. I only export the class itself not the instance, so that when you use new Debug() anywhere in your code the instance is also available on the globalThis.debug member.
11 replies
DDeno
Created by ©TriMoon™ on 2/14/2025 in #help
globalThis woes with VSCode Deno extensions LSP
No description
11 replies
DDeno
Created by Eric on 2/13/2025 in #help
VSCode only TypeScript Errors, nothing from Deno LSP
"deno.enable": true should have been enough, i don't use any of the others...
4 replies
DDeno
Created by Clintonn on 2/14/2025 in #help
I run "deno -A npm:drizzle-kit generate", deno hits me with "Cannot find module 'drizzle-kit'"
Explain what you intend to happen with that command line you used... Then people might be able to guide you better...
5 replies
DDeno
Created by pihentagy on 2/11/2025 in #help
fix library version of a dependency
@pihentagy I just found this that you might want to take a look at, it might help you in this case: https://jspm.org/docs/integrations Especially when combined with: https://jspm.org/docs/integrations#nodejs-loader
7 replies
DDeno
Created by pihentagy on 2/11/2025 in #help
fix library version of a dependency
Seems like they use a Package.json file to define the version used. I have no idea how to override that... (Still new to deno myself too) Maybe try to use vendor and change that file for your own version? 🤔 AFAIK, the vendor option is like making the package a devVersion that creates local package dependancies in your workspace.
7 replies
DDeno
Created by pihentagy on 2/11/2025 in #help
fix library version of a dependency
That version must be a dependancy of [email protected], that you are not able to override like that... Depending on how that module imports gcp-metadata, you might be able to override it maybe using a import-map definition that targets the exact version they use in their import statements.... Maybe you need to use vendor 🤷‍♀️
7 replies
DDeno
Created by Agowan on 2/9/2025 in #help
deno install Omit/exclude dev dependencies from package.json
@coty Why the 👎 , explain 🤔
14 replies
DDeno
Created by lielmus on 2/9/2025 in #help
error: Relative import path "@std/http/file-server" not prefixed with / or ./ or ../
imports need an file to import from in Javascript/es-modules at all times. The standard lib is a collection of modules, that you can use but are not build-in into deno, so you need one of these in your deno.json: -
{
"imports": {
"@std": "jsr:@std"
}
}

{
"imports": {
"@std": "jsr:@std"
}
}

-
{
"imports": {
"@std": "npm:@std"
}
}

{
"imports": {
"@std": "npm:@std"
}
}

Or prefix it directly with jsr: or npm: in your module, like coty said above... - See also: https://docs.deno.com/runtime/fundamentals/configuration/#dependencies
4 replies
DDeno
Created by Agowan on 2/9/2025 in #help
deno install Omit/exclude dev dependencies from package.json
@Agowan Maybe you are confusing install with add? 🤔 - See: deno help install and deno help add
14 replies
DDeno
Created by Agowan on 2/9/2025 in #help
deno install Omit/exclude dev dependencies from package.json
Hmmmm, is it just me or.... Deno is a runtime environment (just like Node) that runs your code or optionally build an executable that already eliminates stuff using tree-shaking. - It is not a bundler, for that you need to use external tools like esbuild. devDependencies are relevant when building the final product (the executable) from scratch, but not when bundling just the code you wrote that makes use of those... To make it clear: install needs all devDependencies to build an executable...
14 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
For future readers of this thread: For time being i think i will just use https://github.com/guybedford/es-module-shims in my html pages to directly load TypeScript files in the browser while learning TS and Life-Previews... 🖖
12 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
I didn't even know of the existance of that command in VSCode/Codium 🤣 Any idea how to create a task that opens the current html page with that command? (Maybe it can replace that Life Preview extension...) edit: I just noticed that browser is unable to open local files using file:///abs-path/index.html, so i would still need a webserver or serve.js (The latter is provided by Life Preview already) 😥
12 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
12 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
Yes im currently using https://github.com/microsoft/vscode-livepreview but would have expected this to be a functionality of https://github.com/denoland/vscode_deno itself, maybe i should open a RFE on their repo...
12 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
@mattvr Hi sorry to bother you here on the deno discord https://discord.com/channels/684898665143206084/1303058049208025149/1335357437036859392, but... I tried to ask you this in a DM, but it could not be delivered, and you didn't accept my friend-request yet so 😉 Is there any VSCode-extension that provides Life-Preview using dsbuild that i can use? (If not maybe an idea for you...) It would make dsbuild a lot more popular and useful 😉
12 replies
DDeno
Created by ©TriMoon™ on 1/31/2025 in #help
Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.
ok so after some fiddling with dsbuild and some patches by the author, im finally able to serve the src-pages on my machine, still in original es-modules no TypeSript yet. Next steps: - Live preview inside Codium, the deno extension doesn't have a preview it seems arf 🤷‍♀️ - Translate my modules to TypeScript. Stay tuned 😄
12 replies