Anish Shobith P S
SIASapphire - Imagine a framework
•Created by Ruin 🌈🐲 on 1/6/2024 in #sapphire-support
Can't get working in Deno
Update: Uhmm seems like autocomplete is completely broken, disabling
deno.enable
gets its back but things like Deno.readFile
, Deno.env
just throws errors on the editor. Seems like there is no proper fix as of right now. I'll stick to Node for time being.278 replies
SIASapphire - Imagine a framework
•Created by Ruin 🌈🐲 on 1/6/2024 in #sapphire-support
Can't get working in Deno
I think yeah
package.json
was probably the culprit here. I fixed by doing the following steps
1. Deleted deno-lock.json
, deno.json
.
2. Did npm init -y
3. Installed all the required modules
4. Added deno.json
back to define tasks
Worked fine after this, caused a bit issue when it came to the Deno.env
part but adding "deno.enable": true
in .vscode/settings.json
fixed the issue.
Not required but I then just deleted package-lock.json
and node_modules
and ran deno install
and it worked fine after this as well.
I have the pushed the working example to the above github repo I linked.278 replies
SIASapphire - Imagine a framework
•Created by Ruin 🌈🐲 on 1/6/2024 in #sapphire-support
Can't get working in Deno
Uhmm, need to open an age old thread. I see no errors, my console just says
I have a ping command in the
commands
directory which does not seem to load example from the docs https://sapphirejs.dev/docs/Guide/getting-started/creating-a-basic-app-command
Steps I followed to setup the project in deno.
Step 1: deno init
Step 2: deno add npm:@sapphire/framework npm:[email protected]
Step 3: Created src/main.ts
.
Step 4: Created commands/ping.ts
with the above slash command example shared.
Step 5: Made a listeners/ready.ts
(because earlier the slash command or prefix based command would just not work, I also ensured that loadMessageCommandListeners
was enabled when checking via prefix
based)
Still now it does not emit ready.ts
with the message.
Minimal Repo Link: https://github.com/anishshobithps/discord-deno-test
Note: I have read solutions marked before asking users to use either node
or bun
but now that deno have released support for npm packages in the v2 I wanted to see if deno is gonna work now.278 replies