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.

[BUG] Unhandled Rejection at: Promise <rejected> TypeError: ts.isVariableStatement is not a function

See original GitHub issue
Overview of the issue

Gettting this error when i try to run ‘npm run doc:buildandserve’

Unhandled Rejection at: Promise { <rejected> TypeError: ts.isVariableStatement is not a function at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5538:24 at Array.reduce (<anonymous>) at Dependencies.getRouteIO (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5537:41) at parseNode (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5111:36) at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5243:13 at visitEachNode (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/typescript/lib/typescript.js:14785:30) at Object.forEachChild (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/typescript/lib/typescript.js:14959:24) at Dependencies.getSourceFileDecorators (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:4891:12) at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:4745:27 at Array.map (<anonymous>) } reason: TypeError: ts.isVariableStatement is not a function at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5538:24 at Array.reduce (<anonymous>) at Dependencies.getRouteIO (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5537:41) at parseNode (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5111:36) at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:5243:13 at visitEachNode (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/typescript/lib/typescript.js:14785:30) at Object.forEachChild (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/typescript/lib/typescript.js:14959:24) at Dependencies.getSourceFileDecorators (/home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:4891:12) at /home/iceman/Bitbucket/TestApp/sample/src/main/resources/node_modules/@compodoc/compodoc/dist/index-cli.js:4745:27 at Array.map (<anonymous>)

Operating System, Node.js, npm, compodoc version(s)

OS : Ubuntu 16.04.3 LTS Noe.js : v8.9.1 npm : v8.9.1 Compodoc : 1.0.6

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

package.json file

{ “name”: “web-buyer”, “version”: “0.0.0”, “license”: “MIT”, “scripts”: { “ng”: “ng”, “start”: “ng serve”, “doc:build”: “compodoc -p src/tsconfig.app.json”, “doc:serve”: “compodoc -s”, “doc:buildandserve”: “compodoc -p src/tsconfig.app.json -s”, “buildProd”: “ng build --target=production -op static --aot”, “build”: “ng build -op static -e dev --stats-json”, “test”: “ng test”, “lint”: “ng lint”, “e2e”: “ng e2e”, “bundle-report”: “webpack-bundle-analyzer static/stats.json” }, “private”: true, “dependencies”: { “@agm/core”: “^1.0.0-beta.2”, “@angular-mdl/core”: “^4.0.8”, “@angular-mdl/datepicker”: “0.0.3”, “@angular-mdl/popover”: “^0.8.0”, “@angular-mdl/select”: “^0.11.1”, “@angular/animations”: “^4.3.6”, “@angular/common”: “^4.3.6”, “@angular/compiler”: “^4.3.6”, “@angular/core”: “^4.3.6”, “@angular/forms”: “^4.3.6”, “@angular/http”: “^4.3.6”, “@angular/platform-browser”: “^4.3.6”, “@angular/platform-browser-dynamic”: “^4.3.6”, “@angular/router”: “^4.3.6”, “@ngrx/effects”: “^4.1.1”, “@ngrx/entity”: “^4.1.1”, “@ngrx/store”: “^4.1.1”, “@ngrx/store-devtools”: “^4.1.1”, “core-js”: “^2.4.1”, “libphonenumber-js”: “^1.0.3”, “lodash”: “^4.17.4”, “moment”: “^2.19.2”, “rxjs”: “^5.4.2”, “zone.js”: “^0.8.14” }, “devDependencies”: { “@angular/cli”: “1.4.1”, “@angular/compiler-cli”: “^4.3.6”, “@angular/language-service”: “^4.3.6”, “@compodoc/compodoc”: “^1.0.6”, “@types/jasmine”: “~2.5.53”, “@types/jasminewd2”: “~2.0.2”, “@types/lodash”: “^4.14.91”, “@types/node”: “~6.0.60”, “codelyzer”: “~3.1.1”, “jasmine-core”: “~2.6.2”, “jasmine-spec-reporter”: “~4.1.0”, “karma”: “~1.7.0”, “karma-chrome-launcher”: “~2.1.1”, “karma-cli”: “~1.0.1”, “karma-coverage-istanbul-reporter”: “^1.2.1”, “karma-jasmine”: “~1.1.0”, “karma-jasmine-html-reporter”: “^0.2.2”, “node-sass”: “^4.5.3”, “protractor”: “~5.1.2”, “ts-helpers”: “^1.1.1”, “ts-node”: “~3.2.0”, “tslint”: “~5.3.2”, “typescript”: “~2.3.3”, “webpack-bundle-analyzer”: “^2.9.2” } }

Compodoc installed globally or locally ?

I have installed compodoc locally

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kondzinacommented, Apr 9, 2018

@vogloblinsky - how can i run it now after fix? is any new version?

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

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an unhandled promise rejection? - Stack Overflow
The origin of this error lies in the fact that each and every promise is expected to handle promise rejection i.e. have a...
Read more >
Unhandled Promise Rejections in Node.js - The Code Barbarian
Calling reject() with a non-error is considered bad practice, but if you do, 'unhandledRejection' will get the argument you passed to reject() ....
Read more >
Handling those unhandled promise rejections with JS async ...
One of your await ed functions fails (i.e. rejects a promise); You get the error. Another possibility is that you know you need...
Read more >
Tracking Unhandled Promise Rejections - TrackJS
If an error condition arises inside a promise, you “reject” the promise by calling the reject() function with an error. To handle a...
Read more >
PromiseRejectionEvent() - Web APIs - MDN Web Docs
There are two types of PromiseRejectionEvent : unhandledrejection is sent by the JavaScript runtime when a promise is rejected but the ...
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