Cannot read properties of null (reading 'byteLength')
I keep getting this error in my script but I can't figure out the cause of it.
Short code snippet:
16 Replies
The code snippet is primarily from this sample:
https://github.com/discordjs/guide/blob/main/code-samples/popular-topics/canvas/14/index.js
What is your discord.js version? Can you do
npm ls discord.js
?14.22.1
Can you do,
npm ls @discordjs/rest
and show me the output?
Weird, this was fixed. I'm not sure if the fix was backported tho
i've been stuck at this problem for a few hours now, I might just scrap the entire thing for the time being
The original issue was from undici which labeled it as non-issue. There was a fix from d.js side
for dev in this pr https://github.com/discordjs/discord.js/pull/11015
that sucks
not really sure where to go from there
Do you have undici installed separately?
yeah
Then that's likely the issue, the version affected with the bug is not used by d.js, so you installing the latest version could be the issue here
let me try and uninstall
the built attachment exists I think, but the image is never sent via reply

the error doesnt show up anymore either
theres nothing wrong with this is there
so things work now because I also had noblox.js installed
which was interferring with the discord.js' undici
but now my problem is how I can keep both packages without both versions of undici interfering with eachother