Stokestack
Stokestack
DDeno
Created by Stokestack on 11/14/2024 in #help
How do you pass additional options to the code formatter, dprint?
Dprint is the formatter used by Deno, but the options listed for inclusion in deno.json are a tiny subset of those available in dprint. The doc here: https://docs.deno.com/runtime/fundamentals/linting_and_formatting/ says you can "specify custom rules" but never says how. Any insight appreciated!
3 replies
DDeno
Created by Stokestack on 7/22/2024 in #help
mkdirsync is throwing an exception that can't be caught?
This code used to work, so I don't know what changed. export default { validateEnvironment() { try { Deno.mkdirSync(config.UPLOAD_PATH); // <- THROWS } catch (error) { if(error.name == "AlreadyExists") { console.log("Uploads directory exists."); } else { console.error(error); return; } } console.log("Environment validated."); } } I call this on startup in my main.ts. It's all synchronous. But the server halts with an exception because the directory already exists. Why?
14 replies
DDeno
Created by Stokestack on 6/16/2024 in #help
Deno project suddenly won't launch in VS Code
I haven't changed anything in my project or environment except having done a brew update/upgrade, which may have updated Deno. Now when I try to launch my server code in VS Code, it doesn't run. There are no error messages or other indications of trouble, and the server runs fine if I launch it from the command line. I tried re-intializing the working folder with the Deno plug-in, but this did not change anything. This setup had been working for months. Any ideas?
10 replies