Mateo-tem / discord-modals

discord-modals is a package that allows your bot of discord.js v13 to create the new Discord Modals and interact with them.
https://www.npmjs.com/package/discord-modals
MIT License
93 stars 27 forks source link

discord-modals crashes on load, Package subpath ./v9 not defined #74

Closed Myzumi closed 2 years ago

Myzumi commented 2 years ago

Im trying to use discord-modals for my big community bot but onto using it, it crashes the bot because it cannot find the "Package subpath './v9'" in the export

Full Error:

node:internal/modules/cjs/loader:488
      throw e;
      ^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v9' is not defined by "exports" in /home/container/node_modules/discord-api-types/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:453:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:731:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/container/node_modules/discord-modals/src/structures/Interaction.js:3:29) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Notices: Bot runs on a DOCKER Container. Discord.js Version: 13.6.0 discord-modals Verison: 1.3.5

Im ready to share more infomations if needed.

Mateo-tem commented 2 years ago

Try to reinstall discord.js and discord-modals

Myzumi commented 2 years ago

Hi,

Sorry for the late response, i've got it fixed by updating discord-api-types to the latest version that includes the v9 gateways

Mateo-tem commented 2 years ago

Great!

Myzumi commented 2 years ago

Maybe include the latest version from discord-api-types in the package.json so others won't get it if they are using a very old version from it