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] Cannot generate documentation for app in Angular monorepo workspace

See original GitHub issue
Overview of the issue

When I’m trying to generate documentation I get an error

(node:15876) V8: /home/sergey/Projects/EMBAS-A-manage-front/node_modules/viz.js/viz.js:33 Invalid asm.js: Function definition doesn’t match use

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

Kubuntu 20.04, Nodejs v12.14.1, npm v6.14.5, Compodoc v1.1.11

Angular configuration, a package.json file in the root folder
"dependencies": {
        "@angular-material-components/color-picker": "^2.0.2",
        "@angular/animations": "^9.1.11",
        "@angular/cdk": "^9.2.4",
        "@angular/common": "^9.1.11",
        "@angular/compiler": "^9.1.11",
        "@angular/core": "^9.1.11",
        "@angular/forms": "^9.1.11",
        "@angular/material": "^9.2.4",
        "@angular/material-moment-adapter": "^9.2.4",
        "@angular/platform-browser": "^9.1.11",
        "@angular/platform-browser-dynamic": "^9.1.11",
        "@angular/router": "^9.1.11",
        "@ngx-translate/core": "^12.1.2",
        "@ngx-translate/http-loader": "^5.0.0",
        "angular-draggable-droppable": "^4.5.1",
        "bootstrap": "^4.5.0",
        "chart.js": "^2.9.2",
        "core-js": "^3.6.5",
        "jsbarcode": "^3.11.0",
        "lodash": "^4.17.15",
        "mathjs": "^6.6.5",
        "moment": "^2.27.0",
        "ngx-color-picker": "^9.1.0",
        "ngx-mask": "^9.1.2",
        "ngx-mat-select-search": "^3.0.0",
        "popper.js": "^1.16.1",
        "rxjs": "^6.5.5",
        "serialize-error": "^7.0.1",
        "tslib": "^1.13.0",
        "tui-image-editor": "^3.8.0",
        "zone.js": "~0.10.2"
    },
    "devDependencies": {
        "@angular-devkit/build-angular": "~0.901.9",
        "@angular-devkit/build-ng-packagr": "~0.901.9",
        "@angular/cli": "^9.1.9",
        "@angular/compiler-cli": "^9.1.11",
        "@angular/language-service": "^9.1.11",
        "@compodoc/compodoc": "^1.1.11",
        "@types/chart.js": "^2.9.22",
        "@types/jasmine": "^3.5.11",
        "@types/jasminewd2": "^2.0.8",
        "@types/lodash": "^4.14.156",
        "@types/mathjs": "^6.0.5",
        "@types/node": "^12.12.47",
        "codelyzer": "^5.2.2",
        "concurrently": "^5.2.0",
        "faker": "^4.1.0",
        "husky": "^4.2.5",
        "imagemin": "^7.0.1",
        "imagemin-pngquant": "^9.0.0",
        "imagemin-svgo": "^8.0.0",
        "jasmine-core": "^3.5.0",
        "jasmine-marbles": "^0.6.0",
        "jasmine-spec-reporter": "^5.0.2",
        "karma": "^5.1.0",
        "karma-chrome-launcher": "^3.1.0",
        "karma-coverage-istanbul-reporter": "^3.0.3",
        "karma-jasmine": "^3.3.1",
        "karma-jasmine-html-reporter": "^1.5.4",
        "ng-packagr": "^9.1.5",
        "ng2-mock-component": "^0.2.0",
        "prettier": "^2.0.5",
        "pretty-quick": "^2.0.1",
        "protractor": "^7.0.0",
        "protractor-jasmine2-screenshot-reporter": "^0.5.0",
        "standard-version": "^8.0.0",
        "ts-node": "~7.0.0",
        "tslint": "~5.11.0",
        "typescript": "~3.7.5",
        "webpack-bundle-analyzer": "^3.8.0"
    }
Compodoc installed globally or locally ?

Locally

If possible sourcecode of the file where it breaks
If possible your terminal logs before the error

sergey@sergey-K:~/Projects/EMBAS-A-manage-front$ npx compodoc -p projects/public/tsconfig.app.json -d ./documentation/public -n “Documentation for Public app” --hideGenerator -t --disableCoverage Compodoc v1.1.11 (node:15876) V8: /home/sergey/Projects/EMBAS-A-manage-front/node_modules/viz.js/viz.js:33 Invalid asm.js: Function definition doesn’t match use

Motivation for or Use Case

It doesn’t generate any documentation.

Reproduce the error
Related issues
Suggest a Fix

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

2reactions
rfprodcommented, Nov 1, 2020

This does not solve generation for an application or a library, but it works for the whole monorepo.

Create tsconfig.compodoc.json in the project root

{
  "extends": "./tsconfig.base.json",
  "include": ["./apps/**/*.ts", "./libs/**/*.ts"],
  "exclude": ["**/*.spec.ts"]
}

Execute

npx compodoc -p tsconfig.compodoc.json
2reactions
curiouscod3commented, Aug 3, 2020

Same here I am using Angular 10

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Complete Guide to Running a Full-Stack Angular ...
This article serves as a complete guide to running a full-stack Angular application in a monorepo. It provides a step-by-step procedure.
Read more >
Creating libraries - Angular
This page provides a conceptual overview of how to create and publish new libraries to extend Angular functionality. If you find that you...
Read more >
Can't create an Angular Library on Nx monorepo
I have a monorepo with an Angular App.
Read more >
Configuring build settings - AWS Amplify Hosting
yml file and add it to the root of your repository. You can edit an app's build settings in the Amplify console by...
Read more >
Set up Storybook for Angular Projects - Nx
The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting ......
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