-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of undefined (reading '0') #1059
Comments
Okay, so I can get rid of the error by removing the decorators of the controller functions, like Not particularly helpful in solving the issue, but might help narrow down what exactly the issue is? |
Upon further investigation it seem as though the code isn't properly patched, or just not ran though the compiler? I added some debug statement just before it fails:
It seems like So I checked the patching, and that seems to be fine:
|
Summary
Write a short summary of the bug in here.
So, I have an existing Nest project using mono-repo, and I'd like to add nestia to this. So I followed the instructions, and all this seems to work fine. When I try to start one of the mono-repo apps using
nest start --inspect --debug --watch
It gives several error messages, all similar, like this:
ERROR in ./libs/raja/src/raja.serviceInterface.ts Module build failed (from ./node_modules/ts-loader/index.js): TypeError: Cannot read properties of undefined (reading '0') at get_name (/Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/MethodTransformer.js:47:67) at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/MethodTransformer.js:37:22 at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/MethodTransformer.js:20:70 at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/NodeTransformer.js:13:67 at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/FileTransformer.js:22:72 at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/FileTransformer.js:16:91 at /Users/***/***-mono-ts/node_modules/@nestia/core/lib/transformers/FileTransformer.js:16:185 at visitArrayWorker (/Users/***/***-mono-ts/node_modules/typescript/lib/typescript.js:93751:49) at visitNodes2 (/Users/***/***-mono-ts/node_modules/typescript/lib/typescript.js:93722:19) at visitEachChildOfClassDeclaration (/Users/***/***-mono-ts/node_modules/typescript/lib/typescript.js:94665:7) @ ./libs/raja/src/raja.serviceImpl.ts 4:32-66 @ ./apps/ingest/src/***/***.module.ts 25:27-68 @ ./apps/ingest/src/main.ts 7:25-60
Sadly, It doesn't tell me what line number to check, and I've checked the files and cannot find anything "offensive" in there either. Also don't know how to debug this further.
Code occuring the bug
I don't know...
Before creating some demonstration code, I though I might have missed something very obvious, plus given that I do not know what triggers any of this, it's rather hard to make any demonstration code.
The text was updated successfully, but these errors were encountered: