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.

Unhandled Rejection at: Promise { <rejected> TypeError: Cannot read property 'text' of undefined

See original GitHub issue

nhandled Rejection at: Promise { <rejected> TypeError: Cannot read property ‘text’ of undefined at C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:5691:55 at Function.ArrayUtils.find (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\utils\ArrayUtils.js:38:21) at Object.getNodeByNameOrFindFunction (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\utils\compiler\getNodeByNameOrFindFunction.js:10:36) at SourceFile.StatementedNode.class_1.getVariableDeclaration (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\compiler\statement\StatementedNode.js:312:28) at RouterParserUtil.cleanCallExpressions (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:5688:45) at AngularDependencies.getSourceFileDecorators (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:8151:46) at C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:7960:31 at Array.map (<anonymous>) at AngularDependencies.getDependencies (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:7949:21) at CliApplication.Application.getDependenciesData (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:9498:40) } reason: TypeError: Cannot read property ‘text’ of undefined at C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:5691:55 at Function.ArrayUtils.find (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\utils\ArrayUtils.js:38:21) at Object.getNodeByNameOrFindFunction (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\utils\compiler\getNodeByNameOrFindFunction.js:10:36) at SourceFile.StatementedNode.class_1.getVariableDeclaration (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules\ts-simple-ast\dist\compiler\statement\StatementedNode.js:312:28) at RouterParserUtil.cleanCallExpressions (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:5688:45) at AngularDependencies.getSourceFileDecorators (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:8151:46) at C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:7960:31 at Array.map (<anonymous>) at AngularDependencies.getDependencies (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:7949:21) at CliApplication.Application.getDependenciesData (C:\xampp\htdocs\New CTI\sinta-frontend-upgrade\node_modules@compodoc\compodoc\dist\application-54cd2170.js:9498:40) [14:31:03] Sorry, but there was a problem during parsing or generation of the documentation. Please fill an issue on github. (https://github.com/compodoc/compodoc/issues/new) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sinta-frontend@1.5.2 compodoc: compodoc -p tsconfig.json -w -s --theme laravel npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sinta-frontend@1.5.2 compodoc script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Anggi Anggara CTI\AppData\Roaming\npm-cache_logs\2020-10-26T07_31_03_804Z-debug.log

File on which generation works:

import { NgModule } from ‘@angular/core’; import { Routes, RouterModule } from ‘@angular/router’; import { ClientRoutes } from ‘@sinta/clients’; import { AuthGuard } from ‘@sinta/shared’; import { ClientLayoutComponent } from ‘@sinta/core/client-layout/client-layout/client-layout.component’; import { Page404Component } from ‘@sinta/core/authentication/page404/page404.component’; import { UnauthorizedComponent } from ‘…/authentication/unauthorized/unauthorized.component’;

let custompath: any[] = ClientRoutes; // custompath.push({ // path: ‘**’, // component: Page404Component // }); custompath.push({ path: ‘unauthorized’, redirectTo: UnauthorizedComponent });

const routes: Routes = [ { path: ‘’, component: ClientLayoutComponent, canActivate: [AuthGuard], children: custompath, } ];

@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class ClientLayoutRoutingModule { }

Angular configuration, a package.json file in the root folder:

{ “name”: “sinta-frontend”, “version”: “1.5.2”, “scripts”: { “ng”: “ng”, “start”: “ng serve --host=localhost --live-reload false”, “build”: “ng build”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e”, “livereload”: “ng serve --live-reload false”, “build-prod”: “npm version patch && node ./src/environments/version.build.js && ng build --prod --aot --output-hashing=all”, “build-minor”: “npm version minor && node ./src/environments/version.build.js && ng build --prod --aot --output-hashing=all”, “build-major”: “npm version major && node ./src/environments/version.build.js && ng build --prod --aot --output-hashing=all”, “build-dev”: “npm version patch && node ./src/environments/version.dev.build.js && ng build --configuration=staging --aot --output-hashing=all”, “build-staging”: “npm version patch && node ./src/environments/version.dev.build.js && ng build --configuration=staging --aot --output-hashing=all”, “aot”: “ng serve --aot”, “compodoc”: “compodoc -p tsconfig.json -w -s --theme laravel” }, “private”: true, “dependencies”: { “@agm/core”: “^1.0.0-beta.3”, “@angular/animations”: “^8.2.14”, “@angular/cdk”: “^6.4.7”, “@angular/common”: “^8.2.14”, “@angular/compiler”: “^8.2.14”, “@angular/core”: “^8.2.14”, “@angular/forms”: “^8.2.14”, “@angular/http”: “^6.0.3”, “@angular/material”: “^6.4.7”, “@angular/platform-browser”: “^8.2.14”, “@angular/platform-browser-dynamic”: “^8.2.14”, “@angular/platform-server”: “^8.2.14”, “@angular/router”: “^8.2.14”, “@auth0/angular-jwt”: “^2.0.0”, “@ctrl/ngx-chartjs”: “^2.0.0”, “@ng-bootstrap/ng-bootstrap”: “^4.0.1”, “@ng-idle/core”: “^6.0.0-beta.5”, “@ng-idle/keepalive”: “^6.0.0-beta.5”, “@ng-select/ng-select”: “^2.6.0”, “@ngrx/store”: “^6.0.1”, “@ngx-translate/core”: “^10.0.2”, “@ngx-translate/http-loader”: “^3.0.1”, “@swimlane/ngx-charts”: “^8.0.2”, “@swimlane/ngx-datatable”: “^15.0.0”, “@types/chartist”: “^0.9.39”, “@types/d3-shape”: “^1.2.3”, “accounting”: “^0.4.1”, “angular-archwizard”: “^3.0.0”, “angular-calendar”: “^0.25.2”, “angular-datatables”: “^8.0.0”, “angular-star-rating”: “^4.0.0-beta.3”, “angular-wizard-form”: “^0.4.1”, “angular2-moment”: “^1.9.0”, “angular4-events”: “^5.0.1”, “bootstrap”: “^4.3.1”, “chart.js”: “^2.8.0”, “chartist”: “^0.11.0”, “classlist.js”: “^1.1.20150312”, “core-js”: “^2.5.7”, “crypto-js”: “^3.1.9-1”, “d3”: “^5.4.0”, “datatables.net”: “^1.10.19”, “datatables.net-dt”: “^1.10.19”, “devextreme”: “19.1.3”, “devextreme-angular”: “19.1.3”, “file-saver”: “^2.0.2”, “intl”: “^1.2.5”, “jquery”: “^3.4.1”, “ng-chartist”: “^1.1.1”, “ng-recaptcha”: “^4.2.1”, “ng2-charts”: “^1.6.0”, “ng2-dragula”: “^2.1.1”, “ng2-file-upload”: “^1.3.0”, “ng2-img-cropper”: “^0.9.0”, “ng2-nouislider”: “^1.7.11”, “ng2-search-filter”: “^0.4.7”, “ng2-smart-table”: “1.2.2”, “ng2-tooltip-directive”: “^2.1.8”, “ng2-validation”: “^4.2.0”, “ngx-bootstrap”: “^3.2.0”, “ngx-breadcrumbs”: “0.0.3”, “ngx-breadcrumbs-cs”: “0.0.4”, “ngx-chips”: “^1.9.2”, “ngx-countdown”: “^3.1.0”, “ngx-daterangepicker-material”: “^1.2.4”, “ngx-device-detector”: “^1.3.5”, “ngx-lightbox”: “^2.0.2”, “ngx-order-pipe”: “^2.0.2”, “ngx-perfect-scrollbar”: “^6.3.1”, “ngx-quill”: “^3.0.0”, “ngx-store”: “^2.0.0”, “ngx-toastr”: “^8.7.3”, “ngx-tooltip”: “0.0.9”, “ngx-ui-switch”: “7.0.1”, “ngx-uploader”: “^7.1.0”, “node-sass”: “^4.9.0”, “nouislider”: “^11.1.0”, “pretty-data”: “^0.40.0”, “replace-in-file”: “^4.0.0”, “resize-observer-polyfill”: “^1.5.0”, “rxjs”: “^6.6.3”, “screenfull”: “^3.3.3”, “sql-formatter”: “^2.3.3”, “subsink”: “^1.0.0”, “sweetalert2”: “^7.21.1”, “time-ago-pipe”: “^1.3.2”, “videogular2”: “^6.2.0”, “web-animations-js”: “^2.2.5”, “zone.js”: “^0.9.1” }, “devDependencies”: { “@angular-devkit/build-angular”: “^0.803.29”, “@angular/cli”: “^8.3.29”, “@angular/compiler-cli”: “^8.2.14”, “@angular/language-service”: “^8.2.14”, “@compodoc/compodoc”: “^1.1.11”, “@schematics/angular”: “^7.3.9”, “@types/core-js”: “^0.9.43”, “@types/datatables.net”: “^1.10.17”, “@types/jasmine”: “^2.8.7”, “@types/jquery”: “^3.3.29”, “@types/node”: “^10.1.4”, “codelyzer”: “^4.3.0”, “install-peers”: “^1.0.2”, “jasmine-core”: “^3.1.0”, “jasmine-spec-reporter”: “^4.2.1”, “karma”: “^4.1.0”, “karma-chrome-launcher”: “^2.2.0”, “karma-cli”: “~1.0.1”, “karma-coverage-istanbul-reporter”: “^2.0.1”, “karma-jasmine”: “^1.1.2”, “karma-jasmine-html-reporter”: “^1.1.0”, “protractor”: “^5.3.2”, “replace-in-file”: “^4.0.0”, “rxjs-compat”: “6.2.2”, “ts-node”: “^6.0.5”, “tslint”: “^5.10.0”, “typescript”: “3.5.3” } }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
coder-pikachucommented, Apr 24, 2021

Same issue!

1reaction
Sebastian-Gcommented, Mar 19, 2021

Same issue here: Please fix 😢

[11:48:29] Analysing routes definitions and clean them if necessary
Unhandled Rejection at: Promise {
  <rejected> InvalidOperationError: Could not find the node's symbol.
      at InvalidOperationError.BaseError [as constructor] (/top-secret/node_modules/ts-simple-ast/dist/errors/BaseError.js:7:28)
      at new InvalidOperationError (/top-secret/node_modules/ts-simple-ast/dist/errors/InvalidOperationError.js:8:28)
      at Object.throwIfNullOrUndefined (/top-secret/node_modules/ts-simple-ast/dist/errors/helpers.js:96:15)
      at Identifier.Node.getSymbolOrThrow (/top-secret/node_modules/ts-simple-ast/dist/compiler/common/Node.js:131:23)
      at RouterParserUtil.cleanFileDynamics (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5668:18)
      at AngularDependencies.getSourceFileDecorators (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:8152:46)
      at /top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:7960:31
      at Array.map (<anonymous>)
      at AngularDependencies.getDependencies (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:7949:21)
      at CliApplication.Application.getDependenciesData (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:9498:40)
} reason: InvalidOperationError: Could not find the node's symbol.
    at InvalidOperationError.BaseError [as constructor] (/top-secret/node_modules/ts-simple-ast/dist/errors/BaseError.js:7:28)
    at new InvalidOperationError (/top-secret/node_modules/ts-simple-ast/dist/errors/InvalidOperationError.js:8:28)
    at Object.throwIfNullOrUndefined (/top-secret/node_modules/ts-simple-ast/dist/errors/helpers.js:96:15)
    at Identifier.Node.getSymbolOrThrow (/top-secret/node_modules/ts-simple-ast/dist/compiler/common/Node.js:131:23)
    at RouterParserUtil.cleanFileDynamics (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5668:18)
    at AngularDependencies.getSourceFileDecorators (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:8152:46)
    at /top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:7960:31
    at Array.map (<anonymous>)
    at AngularDependencies.getDependencies (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:7949:21)
    at CliApplication.Application.getDependenciesData (/top-secret/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:9498:40)
[11:48:30] Sorry, but there was a problem during parsing or generation of the documentation. Please fill an issue on github. (https://github.com/compodoc/compodoc/issues/new)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible Unhandled Promise Rejection. Cannot read property ...
The problem with Cannot read property 'writeDataToRealm' of undefined is caused by this not being the instance you expected - see How to ......
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 >
Resolving the JavaScript Promise Error "TypeError: Cannot ...
TypeError - Cannot read property 'then' of undefined is thrown when the caller is expecting a Promise to be returned and instead receives ......
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError: Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an undefined...
Read more >
TypeError: Cannot read property 'data' of undefined
catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/ ...
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