Can't get working in Deno

I've been told Sapphire works in Deno, but when I tried to run my project as-is, I get this error.
No description
Solution:
I'm going to use this message to mark as resovled with @Answer Overflow. The TL;DR is that Deno's node modules compatibility is kind of garbage and the solutions are - Stick to NodeJS. @vladdy and I are of the opinion that OP's issues with Node can be solved with Node, it just requires some environment setup. - Use Bun instead of Deno, we fully support it and it does have proper support for node modules....
Jump to solution
138 Replies
RealShadowNova
RealShadowNovaā€¢6mo ago
Does it also run in Node.js?
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
It works fine with Node I deleted my old node_modules and dist folders and now it works, but I do see "Warning: Not implemented: ClientRequest.options.createConnection" Should I be concerned about this? .....the bot also isn't responding to any commands.
ApplicationCommandRegistries: Took 0ms to initialize.
yeah, i think it's looking for javascript files and not properly accounting for typescript files?
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
also this
No description
Favna
Favnaā€¢6mo ago
Are you loading TS files directly? I think we might need to add some code for that still but none of us have installed / used deno before to analyse what to add. Here specifically https://github.com/sapphiredev/pieces/blob/main/src/lib/strategies/LoaderStrategy.ts#L41-L44 For funsies you could try setting that env var mentioned there manually and see what happens But other than that if you can provide a repro sample then we can add proper deno support As for djs not exporting LocaleString, that would suggest you're using an outdated version of DiscordJS or Deno does something really weird and ecosystem incompatible with handling s package that re-exports from other packages. LocaleString is re-exported in discordjs from discord-api-types/v10
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
If you have a package.json (which I do in this case), it uses the module versions in there.
Favna
Favnaā€¢6mo ago
Well is it the latest 14.14.1
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
sorry i thought that was a statement, not a question. it's ~14.14.1 in package.json also, i tried setting TS_NODE_DEV. i'm pretty it did load the files, unlike before, since i got a bunch of import errors that i had to fix, but the commands still don't work and it still says it took 0ms to initialize.
Favna
Favnaā€¢6mo ago
bump because I want to look into this still
Favna
Favnaā€¢6mo ago
This is where I'm at now. @vladdy we should fix Deno support tbh. No idea yet why it picks up 1 command many times nor why it fails to load CoreReady.
vladdy
vladdyā€¢6mo ago
Ugh... Deno support will be hell compared to bun
Favna
Favnaā€¢6mo ago
GitHub
fix: add deno to the filters for loading TS files by favna Ā· Pull R...
This is at least one thing that's required, aside from any other issues that need to be fixed to add Deno support.
Favna
Favnaā€¢6mo ago
Did you get the same errors as me @Ruin šŸ² ?
vladdy
vladdyā€¢6mo ago
I wonder if the registry is somehow affected or if the piece is just loaded multiple times If you can get me a minimum repro I can take a look when I'm back And I've got some time Also does deno import esm or cjs of our module
Favna
Favnaā€¢6mo ago
ESM
vladdy
vladdyā€¢6mo ago
Phew But does it import esm or cjs of pieces When you import framework
Favna
Favnaā€¢6mo ago
esm again
Favna
Favnaā€¢6mo ago
GitHub
GitHub - favna/sapphire-deno-repro: A tiny repro for sapphire + deno
A tiny repro for sapphire + deno. Contribute to favna/sapphire-deno-repro development by creating an account on GitHub.
vladdy
vladdyā€¢6mo ago
Ty
Favna
Favnaā€¢6mo ago
As for the bottom error that it fails to unload CoreReady, for some reason it tried to unload it twice
vladdy
vladdyā€¢6mo ago
damn, we had the same issue with bun iirc but thats related to the piece being loaded twice we fix that, we fix the error
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
Nope. I listed out all the errors I had. Fwiw, I also had issues with i13n ( https://discord.com/channels/737141877803057244/1193004162967928902/1193063221502943372 ), so you may want to add that to the repro repo. Maybe in a different branch so you can focus on base functionality first.
vladdy
vladdyā€¢6mo ago
yeahhh we have the repo above ^ once we fix that, it should all be gud
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
Yeah, I was saying to add code for i13n to that repo, probably in a different branch. (also cute PFP o3o) Anyways, I'll try to pull myself away from GTA V to test the latest Sapphire version. Is there a way to have Sapphire output verbose?
Favna
Favnaā€¢6mo ago
FYI it's I18n not 13. The 18 refers to the amount of letters between the I and the N in the word internationalisation Likewise it's l10n for localisation and k8s for kubernetes
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
mistype
Favna
Favnaā€¢6mo ago
See the src/main.ts in my repo logger config All good. Some people don't know what the number represents so I was making sure.
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
i knew what the 18 was. i just didn't bother checking if the number was correct. lol
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
deno still doesn't find any commands for me btw
No description
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
I did explicitly add "@sapphire/pieces": "^4.2.1" to my package.json
RealShadowNova
RealShadowNovaā€¢6mo ago
You will probably need to add resolutions so that framework uses that version.
Favna
Favnaā€¢6mo ago
deno deduplicates and symlinks I saw in my repo but you do have to delete node_modules and deno.lock then restart for that
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
you can also --unstable-byonm (Bring Your Own Node Modules) to use the packages npm / pnpm installs. btw, should someone pin the repro link? oh. i figured out why it can't find my commands.
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
No description
Favna
Favnaā€¢6mo ago
That doesn't quite explain why I get more errors than you still tho pepeHmm
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
I mean, this is Deno reading the command files multiple times for some reason. hmm actually Loaded 1 commands.
Favna
Favnaā€¢6mo ago
Well maybe that'll happen for you now as well Yeah that's logged for me too But then it API errors
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
actually, it registered commands just fine on my project.
Favna
Favnaā€¢6mo ago
pepeHmm
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
No description
Favna
Favnaā€¢6mo ago
Pls share your project tbh
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
funny thing is i've been working to make it public. was previously a specialized bot for a single server with a bunch of hardcoded values. granted, idk if the project would work with a new bot. the commands are already registered.
Favna
Favnaā€¢6mo ago
I mean thats @Gemboard as well but that didn't stop me from making it open source šŸ‘€
vladdy
vladdyā€¢6mo ago
I love how deno task start just hangs on fetching snowflake
Favna
Favnaā€¢6mo ago
Not for me...
vladdy
vladdyā€¢6mo ago
eh, a restart worked also denos lsp does NOT like our sapphire/framework imports wth Relative import path "@sapphire/framework" not prefixed with / or ./ or ../
Favna
Favnaā€¢6mo ago
Worked fine for me after adding the plugin and running the bot once to build the modules
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
oh uh
Favna
Favnaā€¢6mo ago
Might have to reload once
vladdy
vladdyā€¢6mo ago
ye i did restart the LSP
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
just published my repo and immediately got this system message
No description
vladdy
vladdyā€¢6mo ago
did you commit your token
Favna
Favnaā€¢6mo ago
Lmao published a token
vladdy
vladdyā€¢6mo ago
KEKW
Favna
Favnaā€¢6mo ago
Happens to the best of us
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
i think it was an old commit
Favna
Favnaā€¢6mo ago
Have fun resetting the token
vladdy
vladdyā€¢6mo ago
yep its already reset thats what the system message is for
Favna
Favnaā€¢6mo ago
It tells you to obtain a new token not that the current token has been nuked...
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
oh fuck the prod bot is broken
vladdy
vladdyā€¢6mo ago
favna pls meguFace
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
GitHub
GitHub - RuiNtD/GumroadBot at deno
Contribute to RuiNtD/GumroadBot development by creating an account on GitHub.
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
whatever here's the thing
Favna
Favnaā€¢6mo ago
Oh
vladdy
vladdyā€¢6mo ago
"our token-scanning gremlins noticed, and have reset your bot's token"
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
idek if it works on a new bot. all i tried was on my existing dev bot (with the same commands) and tried renaming one of my commands.
vladdy
vladdyā€¢6mo ago
why tf does it not rebuild if i changed a file
Favna
Favnaā€¢6mo ago
Uhm you don't actually use deno if you use pnpm?
vladdy
vladdyā€¢6mo ago
whos that to
Favna
Favnaā€¢6mo ago
Ruin
vladdy
vladdyā€¢6mo ago
...oh god so
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
deno can use the modules in node_modules
vladdy
vladdyā€¢6mo ago
funny thing
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
that's why there's a "byonm" flag in deno.jsonc
Favna
Favnaā€¢6mo ago
Yeah but you also don't call deno run You call pnpm
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
i just call deno run from CLI.
Favna
Favnaā€¢6mo ago
Oh it's not in your package.json like it is for my repo That's what threw me off
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
yeah this is a half converted node project
vladdy
vladdyā€¢6mo ago
ok fun fact: deno doesnt cache imports
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
i'm trying to use deno because i fucking hate node
vladdy
vladdyā€¢6mo ago
why to both of those statements
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
version management and it'd be easier to update prod
Favna
Favnaā€¢6mo ago
Maybe try Bun instead? We should definitely support that now
vladdy
vladdyā€¢6mo ago
version management
has nothing to do with node
also
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
package management, having to update the packages every time i push to prod
vladdy
vladdyā€¢6mo ago
if you import store from pieces directly, its a different instance than the Store exported from framework wtaf deno not true either
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
am on windows
vladdy
vladdyā€¢6mo ago
between npm ci, yarn and pnpm, all support just installing w/e is in the lockfile and strictly that
Favna
Favnaā€¢6mo ago
I mean WSL.. But yes that's a pita
vladdy
vladdyā€¢6mo ago
WHY IS WALK GETTING CALLED TWICE ON STORES
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
i just prefer being able to git fetch, git pull and just run the updated code
vladdy
vladdyā€¢6mo ago
and you can do that...with node and if you update dependencies you SHOULD manually run the cmd
Favna
Favnaā€¢6mo ago
As for package versions, works just fine for me for bots. I use renovate to autobump them then I have a GitHub workflow that pushes a new docker file image and I can (but haven't set it up yet) then also auto restart the prod bot. Fully automated.
vladdy
vladdyā€¢6mo ago
anyways back to the issue at hand walk is called twice register is only called ONCE so w t h
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
time to add a shit ton more debugging instead of using breakpoints like a sane person? ĀÆ\_(惄)_/ĀÆ that's what i do no i'm not okay
vladdy
vladdyā€¢6mo ago
oh i dont swing that way, I throw in console.logs in KEKW
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
ayoooooo
vladdy
vladdyā€¢6mo ago
yes favna, sue me
Favna
Favnaā€¢6mo ago
I've been tryign to teach vladdy to use breakpoints for years now I still haven't succeeded
vladdy
vladdyā€¢6mo ago
see the thing is I do use breakpoints when I want to I dont want to rn so I dont dont like it dont care didnt ask oh no I see the issue I think oh for FUCK SAKE
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
oh no
vladdy
vladdyā€¢6mo ago
guess what i found
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
code?
vladdy
vladdyā€¢6mo ago
a nested node modules folder inside framework which has its OWN PIECES VERSION
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
of the spaghetti variety perhaps?
Favna
Favnaā€¢6mo ago
it's symlinked tho
vladdy
vladdyā€¢6mo ago
Then explain to me why this happened
[STORE] [STORE => arguments] [WALK] Loading all pieces from '/Users/vlad/Development/Sapphire/sapphire-deno-repro/src/arguments'.
[STORE] [STORE => arguments] [WALK] Loading all pieces from '/Users/vlad/Development/Sapphire/sapphire-deno-repro/src/arguments'.
Error
at _CommandStore.loadPath (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:264:17)
at loadPath.next (<anonymous>)
at _CommandStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:185:24)
at _CommandStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/structures/CommandStore.mjs:39:17)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:78:70
at Array.map (<anonymous>)
at _SapphireClient.login (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:78:49)
at main (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:19:16)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:28:6
[STORE] [STORE => arguments] [WALK] Loading all pieces from '/Users/vlad/Development/Sapphire/sapphire-deno-repro/src/arguments'.
[STORE] [STORE => arguments] [WALK] Loading all pieces from '/Users/vlad/Development/Sapphire/sapphire-deno-repro/src/arguments'.
Error
at _CommandStore.loadPath (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:264:17)
at loadPath.next (<anonymous>)
at _CommandStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:185:24)
at _CommandStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/structures/CommandStore.mjs:39:17)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:78:70
at Array.map (<anonymous>)
at _SapphireClient.login (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:78:49)
at main (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:19:16)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:28:6
the only place that logs that is in Store#loadPath first thing before logging that, I injected a log for the stack and only 1 stacktrace came wait wtf the symlinks are there HOW CAN THERE BE TWO CALLS
Favna
Favnaā€¢6mo ago
does deno follow symlinks by default? like how node has --follow-symlinks
vladdy
vladdyā€¢6mo ago
HOW IS LOADPATH BEING CALLED WITH MY INJECTED CODE BUT ALSO NOT WHAT this makes no sense ffs favna did you really setup the debug binary to be HOMEBREW DENO
Favna
Favnaā€¢6mo ago
why are you not using homebrew but anyway I just copypastad code from elsewhere lol
vladdy
vladdyā€¢6mo ago
why tf would i use homebrew for a runtime that has its own updater and everything same with bun just use their sh script
Favna
Favnaā€¢6mo ago
I would never brew --update && brew --upgrade is too nice
vladdy
vladdyā€¢6mo ago
first off brew upgrade which does both lol
Favna
Favnaā€¢6mo ago
I very much treat brew like apt and just use it for like .. nearly everything
vladdy
vladdyā€¢6mo ago
fair oh god the debugger does NOT like our promise.all lol w t f is happening oh thats why its logged twice ok so the double logging is correct and fine oh interesting, we have some core listeners that load twice
Favna
Favnaā€¢6mo ago
yeah I noticed that with CoreReady because it got unloaded twice, the second one failing because it's gone already
vladdy
vladdyā€¢6mo ago
but why we had this issue with...cjs being loaded alongside esm but that shouldn't happen
Favna
Favnaā€¢6mo ago
maybe paths arent being loaded correctly because of the symlinks? check what paths it tries to load?
vladdy
vladdyā€¢6mo ago
well they are virtual pieces so who tf knows
Favna
Favnaā€¢6mo ago
hm
vladdy
vladdyā€¢6mo ago
I'll slap some ddebugs into that also funnily enough not all core pieces dupe just some the loader is called twice ...why why is our _load.mjs called twice
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:12:37
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:12:37
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:12:37
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:12:37
..oh my god wait oh my god wait is it bc we import framework twice???
Favna
Favnaā€¢6mo ago
wdym import it twice? that would go handinhand with deno not caching tho
vladdy
vladdyā€¢6mo ago
once in setup, once in main well good news its not that
Favna
Favnaā€¢6mo ago
try moving all the setup stuff to mai..
vladdy
vladdyā€¢6mo ago
funn so i moved it all to root
āÆ deno run --allow-all --config ./deno.json src/main.ts
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:14:37
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:14:37
[INFO] Logging in
esm Error
at _ArgumentStore.loadPath (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:264:24)
at loadPath.next (<anonymous>)
at _ArgumentStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:185:24)
at _SapphireClient.login (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:80:19)
at main (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:38:16)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:47:6
[ERROR] Error [INCORRECT_TYPE]: The piece 'boolean' is not an instance of 'Argument'.
at _ArgumentStore.resolve (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:212:11)
at _ArgumentStore.unload (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/AliasStore.mjs:33:24)
at _ArgumentStore.insert (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:233:18) {
type: "INCORRECT_TYPE"
}
āÆ deno run --allow-all --config ./deno.json src/main.ts
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:14:37
esm load mjs called! Error
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/listeners/_load.mjs:14:37
[INFO] Logging in
esm Error
at _ArgumentStore.loadPath (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:264:24)
at loadPath.next (<anonymous>)
at _ArgumentStore.loadAll (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:185:24)
at _SapphireClient.login (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/framework/dist/esm/lib/SapphireClient.mjs:80:19)
at main (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:38:16)
at file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/src/main.ts:47:6
[ERROR] Error [INCORRECT_TYPE]: The piece 'boolean' is not an instance of 'Argument'.
at _ArgumentStore.resolve (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:212:11)
at _ArgumentStore.unload (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/AliasStore.mjs:33:24)
at _ArgumentStore.insert (file:///Users/vlad/Development/Sapphire/sapphire-deno-repro/node_modules/.deno/@sapphire+framework@5.0.6/node_modules/@sapphire/pieces/dist/esm/lib/structures/Store.mjs:233:18) {
type: "INCORRECT_TYPE"
}
now it just dies so this must be some deno issues with imports in which case we're le fucked I can fix it at the virtual piece level by..making it a map and not an array, so core pieces with the same name dont duplicate but deno is mega broken
Favna
Favnaā€¢6mo ago
It's hell to refactor but maybe do what they do here with deps.ts to cache them?
vladdy
vladdyā€¢6mo ago
i just.. man thats so janky I'll try nop, i completely fucked it now welp
Favna
Favnaā€¢6mo ago
tl;dr: use bun instead of deno lol
vladdy
vladdyā€¢6mo ago
or just stick to whats known to work (node) also open an issue about this to their repo.. i doubt they'd fix it but who knows but I have a fix for now weeeellll now it didnt...load commands??? NOW THE DEFAULT BEHAVIOR DOESNT CHANGE
Favna
Favnaā€¢6mo ago
are you actually changing stuff or is it flaky lol
vladdy
vladdyā€¢6mo ago
no at this point its just what the repo has and its not setting the mode to bulk overwrite even tho the file is called IT JUST RESET oh my god or its a different context, in which case tough luck holy shit deno
Favna
Favnaā€¢6mo ago
it's kind of ironic dont you think that the creator of node rags on about mistakes made with node, then makes deno, and makes it a total clusterfuck
vladdy
vladdyā€¢6mo ago
its because their impl of npm support is a clusterfuck deno itself as a runtime is FINE use it in its ecosystem and you're FINE BUT they half assed the fuck out of node support and here i was moaning that bun was bitchy I dont even know how to describe this behavior to them to ask them to fix it..
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
btw this could be related to i18n not working
No description
vladdy
vladdyā€¢6mo ago
Yeah there's not much we can do, their npn support is hella borked We recommend either going bun or just sticking to node
Ruin šŸ²
Ruin šŸ²ā€¢6mo ago
Did you create a Deno issue?
vladdy
vladdyā€¢6mo ago
.
Solution
Favna
Favnaā€¢5mo ago
I'm going to use this message to mark as resovled with @Answer Overflow. The TL;DR is that Deno's node modules compatibility is kind of garbage and the solutions are - Stick to NodeJS. @vladdy and I are of the opinion that OP's issues with Node can be solved with Node, it just requires some environment setup. - Use Bun instead of Deno, we fully support it and it does have proper support for node modules.