Skip to content
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 property 'owner' of undefined #15

Closed
AnvarNazar opened this issue Aug 10, 2020 · 7 comments
Closed

TypeError: Cannot read property 'owner' of undefined #15

AnvarNazar opened this issue Aug 10, 2020 · 7 comments
Labels

Comments

@AnvarNazar
Copy link

This happened when I run the command tsed generate -r . Pipe CustomPipe

The same error is occurring for every generate command. I am using Windows 10 and Node 12.18.3

(node:7328) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'owner' of undefined
    at ProvidersInfoService.isMyProvider (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\lib\services\ProvidersInfoService.js:23:35)
    at GenerateCmd.<anonymous> (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\lib\commands\generate\GenerateCmd.js:99:36)
    at Generator.next (<anonymous>)
    at C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\tslib\tslib.js:113:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\tslib\tslib.js:109:16)
    at GenerateCmd.$exec (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\lib\commands\generate\GenerateCmd.js:97:24)
    at CliService.<anonymous> (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\@tsed\cli-core\lib\services\CliService.js:101:40)
    at Generator.next (<anonymous>)
    at C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\tslib\tslib.js:113:75
    at new Promise (<anonymous>)
    at Object.__awaiter (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\tslib\tslib.js:109:16)
    at CliService.getTasks (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\@tsed\cli-core\lib\services\CliService.js:94:24)
    at CliService.<anonymous> (C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\@tsed\cli-core\lib\services\CliService.js:54:32)
    at Generator.next (<anonymous>)
    at C:\Users\anvar\AppData\Roaming\npm\node_modules\@tsed\cli\node_modules\tslib\tslib.js:113:75
(node:7328) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:7328) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Romakita
Copy link
Contributor

Yes it's because you use Pipe instead pipe.

I'll fix that :)

@Romakita
Copy link
Contributor

🎉 This issue has been resolved in version 1.17.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Romakita
Copy link
Contributor

@AnvarNazar Fixed :) Can you confirm ?

@AnvarNazar
Copy link
Author

Yes. It works now. I typed it the way it was shown in the help

I think you need to change the help message. @Romakita

tsed help g


Usage: tsed generate|g [options] [type] [name]

Generate a new provider class

Arguments:

  type                   Type of the provider (Injectable, Controller, Pipe, etc...)
  name                   Name of the class

Options:
  -r, --root-dir <path>  Project root directory
  --verbose              Verbose mode
  -h, --help             display help for command

@Romakita
Copy link
Contributor

Ok. What i have to change exactly ? ^^

@AnvarNazar
Copy link
Author

It doesn't matter since you already made it case insensitive

Maybe
type Type of the provider (Injectable, Controller, Pipe, etc...)
to
type Type of the provider (injectable, controller, pipe, etc...)

or just give an example of the command

like

tsed generate service Database

@Romakita
Copy link
Contributor

haaa ok. I'll fix that ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants