I have all the packages installed, but at startup, it gives me an error. Can someone help me, how should I solve this problem?
My package.json file:
node_modules
elastic search module directory (ls):
Error:
I have all the packages installed, but at startup, it gives me an error. Can someone help me, how should I solve this problem?
My package.json file:
node_modules
elastic search module directory (ls):
Error:
First of all, welcome to StackOverflow, please read the guidelines before asking questions. Using images, instead of code
tags is a bad habit. That included formatting of the text, too.
The second thing is, as Micael mentioned, something is wrong with your project. Probably you don't install types for @elasticsearch
. In some libs, they are not prebuilt, but installed separately from @types
. Some libs don't have the necessary types at all.
Deleting a node_modules
folder and reinstalling the app, is the best option here.
Otherwise, it could be bad project initialization. Try Nest CLI for sure. Or wrong tsconfig.json
options.
Please check closely for the following values in your tsconfig.json
:
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"sourceMap": true,
(In case you have troubles with importing libs, instead of separate methods in NestJs, take a look at my other question, it may help you)
If I remember it correctly, the current elasticsearch
lib in the middle of new types-support refactoring. So some of the types in the lib could be missing or imported badly.