BetterDiscordPlugins: [WhoReacted] Plugin could not be compiled

TypeError: Cannot read property 'default' of undefined
    at eval (betterdiscord://plugins/WhoReacted.plugin.js:166:124)
    at buildPlugin (betterdiscord://plugins/WhoReacted.plugin.js:434:12)
    at eval (betterdiscord://plugins/WhoReacted.plugin.js:441:7)
    at Object.requireAddon (<anonymous>:4:43095)
    at Object.loadAddon (<anonymous>:4:8859)
    at Object.loadAddon (<anonymous>:4:40847)
    at Object.updateList (<anonymous>:4:10713)
    at Object.updatePluginList (<anonymous>:4:40544)
    at O.reload (<anonymous>:4:108624)
    at Object.Ye (https://discord.com/assets/417057e696fbefab8369.js:6149:658)
    at qe (https://discord.com/assets/417057e696fbefab8369.js:6149:812)
    at https://discord.com/assets/417057e696fbefab8369.js:6169:409
    at Pr (https://discord.com/assets/417057e696fbefab8369.js:6169:506)
    at Mr (https://discord.com/assets/417057e696fbefab8369.js:6169:920)
    at https://discord.com/assets/417057e696fbefab8369.js:6175:680
    at ke (https://discord.com/assets/417057e696fbefab8369.js:6257:404)
    at https://discord.com/assets/417057e696fbefab8369.js:6171:395
    at Br (https://discord.com/assets/417057e696fbefab8369.js:6171:425)
    at rn (https://discord.com/assets/417057e696fbefab8369.js:6158:757)
    at nn (https://discord.com/assets/417057e696fbefab8369.js:6158:7)
    at t.unstable_runWithPriority (https://discord.com/assets/417057e696fbefab8369.js:6369:828)
    at Ki (https://discord.com/assets/417057e696fbefab8369.js:6180:117)
    at Ue (https://discord.com/assets/417057e696fbefab8369.js:6257:144)
    at en (https://discord.com/assets/417057e696fbefab8369.js:6157:800)
    at HTMLDivElement.r (https://discord.com/assets/ea40f89e67e976efa166.js:126:559)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 13
  • Comments: 21 (1 by maintainers)

Most upvoted comments

It looks like the “Reactions” module being looked for at line 166 got renamed to “MessageReactions”. As a temporary workaround, you should be able to manually patch this line and reload.

const Reactions = external_BoundedLibrary_namespaceObject.WebpackModules.find(m => m?.default?.displayName === 'Reactions').default;

To

const Reactions = external_BoundedLibrary_namespaceObject.WebpackModules.find(m => m?.default?.displayName === 'MessageReactions').default;

I’m unsure what other effects/changes this may cause. No guarantees.

Found it, thanks. I don’t usually dig around in the files themselves, just install them and drag.

So I feel dumb because the plugin won’t compile at the start and it doesn’t let me get to that line to change it, it’s only a few lines. How do I get that far down in the module?

For those that need some assistance patching while we wait for a fix:

  1. Open Discord. Plugin will fail to load and you will get the error message. This is ok.
  2. Open Settings > BetterDiscord > Plugins
  3. Click “Open Plugins Folder” button
  4. Find WhoReacted.plugin.js and right click > Open With > Notepad
  5. Apply the fix mentioned above and save the file. This should trigger a reload. Otherwise, CTRL+R should force a reload.
  6. Plugin should load correctly. If it doesn’t, you will hopefully see a difference exception that indicates a different issue.

👍 Good luck