unknown81311/BetterMediaPlayer

BetterMediaPlayer Could not be compiled

TheGreatTaz opened this issue · 4 comments

TypeError: Cannot read properties of undefined (reading 'useStateFromStores')
    at eval (betterdiscord://plugins/BetterMediaPlayer.plugin.js:61:33)
    at N.requireAddon (betterdiscord/renderer.js:5:28601)
    at N.loadAddon (betterdiscord/renderer.js:5:6221)
    at N.loadAddon (betterdiscord/renderer.js:5:26269)
    at N.loadAllAddons (betterdiscord/renderer.js:5:9278)
    at N.initialize (betterdiscord/renderer.js:5:3093)
    at N.initialize (betterdiscord/renderer.js:5:25382)
    at Object.startup (betterdiscord/renderer.js:5:408589)

useStateFromStores changed to useSyncExternalStore

Discord added mangling to their top-level exports. So now useStateFromStores is something annoying like s. I'll get to this at some point

From what I can tell, that's not the only Webpack get that's failing.

  • Switch: { filter: Webpack.Filters.byStrings("TooltipContainer", "tooltipNote:"), searchExports: true }
  • Button: { filter: m => m.Sizes && m.BorderColors, searchExports: true }
  • Guild: { filter: m => m.prototype?.deleteRole && m.prototype.getIconURL }

These three also return undefined, and I haven't had any luck in fixing them myself

Fixed in latest commit