V
V
Vadim Ushakov2021-11-22 18:59:49
Node.js
Vadim Ushakov, 2021-11-22 18:59:49

How to fix package file missing error?

There was an error in the process of writing and exploiting the solution, error

Error: Cannot find module 'discord.js/typings/enums'
Require stack:
- D:\workspace\upwork.discord.js\interactions.js
- D:\workspace\upwork.discord.js\main.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    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> (D:\workspace\upwork.discord.js\interactions.js:139:38)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\workspace\\upwork.discord.js\\interactions.js',
    'D:\\workspace\\upwork.discord.js\\main.js'
  ]
}
PS D:\workspace\upwork.discord.js>


____The problem is that the modules were not involved, for which reason an error occurred - a mystery to me. Is there a way to fix the error? Reinstalling the project packages does not solve the problem, well, at least in the classical sense.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question