question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'name' of undefined

See original GitHub issue

I’m submitting a…


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

After upgrading to 5.1.0 from 5.0.1 and run yarn start the following error appears:

[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: d:\Desa\TS\authservice\server\src/**/*
[nodemon] starting `ts-node -r tsconfig-paths/register src/main.ts`
[Nest] 1764   - 2018-7-5 10:24:07   [NestFactory] Starting Nest application...
[Nest] 1764   - 2018-7-5 10:24:07   [ExceptionHandler] Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
    at Module.addModuleAsComponent (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\injector\module.js:72:45)
    at Module.addCoreInjectables (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\injector\module.js:56:14)
    at new Module (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\injector\module.js:24:14)
    at NestContainer.addModule (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\injector\container.js:35:24)
    at DependenciesScanner.storeModule (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\scanner.js:32:30)
    at DependenciesScanner.scanForModules (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\scanner.js:22:20)
    at DependenciesScanner.scan (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\scanner.js:17:20)
    at exceptions_zone_1.ExceptionsZone.asyncRun (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\nest-factory.js:75:43)
    at Function.asyncRun (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\errors\exceptions-zone.js:17:19)
    at NestFactoryStatic.initialize (d:\Desa\TS\authservice\server\node_modules\@nestjs\core\nest-factory.js:74:52)
[nodemon] app crashed - waiting for file changes before starting...


## Environment

Nest version: 5.1.0
 
For Tooling issues:
- Node version: 8.11.3 
- Platform:  Windows 

Others:
 Anything else relevant?  Windows 7, VSCode, yarn 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
sgomanfcommented, Jul 5, 2018

Sorry I deleted the node_modules folder and reinstalled the packages and the error disappeared. Previously run yarn upgrade that apparently does not always work.

0reactions
lock[bot]commented, Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'name' of undefined
This type of error mean that your container variable file is not defined. You should use console.log at different places to see what...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property 'name' of undefined
It is a very common error when working with object and array to get a TypeError: Cannot read property 'name' of undefined ....
Read more >
TypeError: Cannot read property 'name' of undefined #20
~/projects/xxx/frontend npm run start ✓ 4s > talan-frontend@1.1.0 start > vue-cli-service serve INFO Starting development server.
Read more >
Cannot read property 'name' of undefined' mean? - Quora
What that means is that you are trying to access a property named “name” from an object that has no instance yet, so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found