Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'file-type'

I get this error and dont know how to solve this.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'file-type' imported from C:\Users\Administrator\Desktop\EliteArk Main Ticketbot 3\node_modules@discordjs\rest\dist\index.js
Did you mean to import file-type/index.js?
at new NodeError (node:internal/errors:372:5)
at packageResolve (node:internal/modules/esm/resolve:954:9)
at moduleResolve (node:internal/modules/esm/resolve:1003:20)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ESMLoader.import (node:internal/modules/esm/loader:380:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1043:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:21)
at importModuleDynamically (node:vm:381:46) {
code: 'ERR_MODULE_NOT_FOUND'
} Unhandled Rejection at Promise
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'file-type' imported from C:\Users\Administrator\Desktop\EliteArk Main Ticketbot 3\node_modules@discordjs\rest\dist\index.js
Did you mean to import file-type/index.js?
at new NodeError (node:internal/errors:372:5)
at packageResolve (node:internal/modules/esm/resolve:954:9)
at moduleResolve (node:internal/modules/esm/resolve:1003:20)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ESMLoader.import (node:internal/modules/esm/loader:380:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1043:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:21)
at importModuleDynamically (node:vm:381:46) {
code: 'ERR_MODULE_NOT_FOUND'
} Unhandled Rejection at Promise
5 Replies
d.js toolkit
d.js toolkit2y ago
• 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.
Default
DefaultOP2y ago
Node version: v16.16.0
Default
DefaultOP2y ago
Default
DefaultOP2y ago
Default
DefaultOP2y ago
alright, alright I will let you know if it worked! ty already So, the issue still persists. because this error is from my client but i compile the bot with nexe, so im not sure why this error occurs i have to try, 1 sec i dont get any errors when running in node oke, i will investigate further. ty for the help
Want results from more Discord servers?
Add your server