#Error [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath '.distmessagesembedAssertions'

17 messages · Page 1 of 1 (latest)

frank remnantBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

wispy estuary
#
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/messages/embed/Assertions' is not defined by "exports" in C:\Users\julus\OneDrive\Desktop\Projekty\Boty\QSN BOT\node_modules\@discordjs\builders\package.json     
    at new NodeError (node:internal/errors:372:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:472:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:753: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> (C:\Users\julus\OneDrive\Desktop\Projekty\Boty\QSN BOT\index.js:23:33) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}```
#

theres nothing wrong with my code its a discord.js package error

hardy parcel
#

How are you receiving this error?

wispy estuary
#

whenever im starting the bot using node .

hardy parcel
#

I meant what are you importing

wispy estuary
#

it happened when i added a new embed

#
    const embedone = new Discord.MessageEmbed()
    .setColor(m.color('info'))
    .setAuthor("Info")
    .addField(`Welcome Message`, welcomemsg)
    .addField(`Welcome Channel`, welcomechan)
    .addField(`Welcome DM Message`, welcomedm)```
hardy parcel
#

That has nothing to do with my question |:

#

Are you using discord.js version 13.10.2?

wispy estuary
#

13.10.3

hardy parcel
#

I'm not receiving such an error

#

C:\Users\julus\OneDrive\Desktop\Projekty\Boty\QSN BOT\index.js:23:33
What's here?

wispy estuary
#

oh wait lmao

#

vscode autofilling ai or something added this const { embedFieldPredicate } = require('@discordjs/builders/dist/messages/embed/Assertions'); to my code

#

well thank u i havent noticed this line

hardy parcel
#

Yeah, that would be what you are importing