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

[BUG] Angular 9.0.5 compodoc not considering module and its component #927

Closed
XJenso opened this issue Mar 11, 2020 · 17 comments
Closed

[BUG] Angular 9.0.5 compodoc not considering module and its component #927

XJenso opened this issue Mar 11, 2020 · 17 comments
Assignees

Comments

@XJenso
Copy link

XJenso commented Mar 11, 2020

Overview of the issue

I have the same issue as case #876. Compodoc dos not parse the module and components.

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

npx compodoc -p src/tsconfig.app.json
1.1.11
TypeScript version used by Compodoc : 2.9.1
TypeScript version of current project : 3.7.5
Node.js version : v10.19.0
Operating system : Linux 3.10

[07:09:31] No configuration file found, switching to CLI flags.
[07:09:31] Using tsconfig file : XXXXXXXXXXXXXXXXXXXX/frontend/src/tsconfig.app.json
[07:09:31] Searching package.json file
[07:09:31] package.json file found
[07:09:31] Processing package.json dependencies
[07:09:31] Searching README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, TODO.md files
[07:09:31] README.md file found
[07:09:31] CHANGELOG.md file found
[07:09:31] Error during XXXXXXXXXXXXXXXXXXXX/frontend/CONTRIBUTING read
[07:09:31] Continuing without CONTRIBUTING.md file
[07:09:31] Error during XXXXXXXXXXXXXXXXXXXX/frontend/LICENSE read
[07:09:31] Continuing without LICENSE.md file
[07:09:31] Error during XXXXXXXXXXXXXXXXXXXX/frontend/TODO read
[07:09:31] Continuing without TODO.md file
[07:09:31] Get dependencies data
[07:09:31] parsing : XXXXXXXXXXXXXXXXXXXX/frontend/src/main.ts
[07:09:31] parsing : XXXXXXXXXXXXXXXXXXXX/frontend/src/polyfills.ts
[07:09:31] -------------------
[07:09:31] Project statistics
[07:09:31] -------------------
[07:09:31] Prepare components
[07:09:31] Prepare modules
[07:09:31] Process documentation coverage report
[07:09:31] Process main graph
[07:09:31] Process pages
[07:09:31] Process page : changelog
[07:09:32] Process page : coverage
[07:09:32] Process page : dependencies
[07:09:32] Process page : index
[07:09:32] Process page : modules
[07:09:32] Process page : overview
[07:09:32] Process menu...
[07:09:32] Copy main resources
[07:09:32] Documentation generated in ./documentation/ in 0.972 seconds using gitbook theme

Angular CLI: 9.0.5
Node: 10.17.0
OS: linux x64

Angular: 9.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.900.5
@angular-devkit/build-angular 0.900.5
@angular-devkit/build-optimizer 0.900.5
@angular-devkit/build-webpack 0.900.5
@angular-devkit/core 9.0.5
@angular-devkit/schematics 9.0.5
@angular/cdk 9.1.1
@angular/material 9.1.1
@angular/material-moment-adapter 9.1.1
@ngtools/webpack 9.0.5
@schematics/angular 9.0.5
@schematics/update 0.900.5
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2

Compodoc installed globally or locally ?

locally

@XJenso
Copy link
Author

XJenso commented Mar 11, 2020

I have a temporary workaround:

use Linux bash:

cd <folder>
echo '{' > tsconfig.compodoc.json
echo '  "extends": "./tsconfig.json",' >> tsconfig.compodoc.json
echo '  "files": [' >> tsconfig.compodoc.json
for i in $(find src/ -name "*.ts")
do
   echo '    "'$i'",' >> tsconfig.compodoc.json
done
echo '  ],' >> tsconfig.compodoc.json
echo '}' >> tsconfig.compodoc.json
npx @compodoc/compodoc -p tsconfig.compodoc.json

kind regards

this is only an example and may differ from the folders in other projects

@f22hd
Copy link

f22hd commented Mar 12, 2020

it seems not supporting angular v9.

@XJenso
Copy link
Author

XJenso commented Mar 13, 2020

that's right. It's not supported yet. But I think / hope this will change in the future. Then an error description is already helpful

@ankurshah32
Copy link

ankurshah32 commented Mar 17, 2020

I am also facing the same issue. Website gets created but with no documentation
1.1.11

TypeScript version used by Compodoc : 2.9.1

TypeScript version of current project : 3.5.3

Node.js version : v12.13.1

Operating system : Windows 10

[09:07:39] No configuration file found, switching to CLI flags.
[09:07:39] Using tsconfig file : C:\Project\Prototypes\analytic-ui-app\tsconfig.app.json
[09:07:39] Searching package.json file
[09:07:39] package.json file found
[09:07:39] Processing package.json dependencies
[09:07:39] Searching README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, TODO.md files
[09:07:39] README.md file found
[09:07:39] Error during C:\Project\Prototypes\analytic-ui-app\CHANGELOG read
[09:07:39] Continuing without CHANGELOG.md file
[09:07:39] Error during C:\Project\Prototypes\analytic-ui-app\CONTRIBUTING read
[09:07:39] Continuing without CONTRIBUTING.md file
[09:07:39] Error during C:\Project\Prototypes\analytic-ui-app\LICENSE read
[09:07:39] Continuing without LICENSE.md file
[09:07:39] Error during C:\Project\Prototypes\analytic-ui-app\TODO read
[09:07:39] Continuing without TODO.md file
[09:07:39] Get dependencies data
[09:07:39] parsing : C:/Project/Prototypes/analytic-ui-app/src/main.ts
[09:07:39] parsing : C:/Project/Prototypes/analytic-ui-app/src/polyfills.ts
[09:07:39] -------------------
[09:07:39] Project statistics
[09:07:39] -------------------
[09:07:39] Prepare components
[09:07:39] Prepare modules
[09:07:39] Process documentation coverage report
[09:07:39] Process main graph
(node:27856) V8: C:\Users\ankur.shah\AppData\Roaming\npm\node_modules@compodoc\compodoc\node_modules\viz.js\viz.js:33 Invalid asm.js: Function definition doesn't match use
[09:07:39] Process pages
[09:07:39] Process page : coverage
[09:07:39] Process page : dependencies
[09:07:39] Process page : index
[09:07:39] Process page : modules
[09:07:39] Process page : overview
[09:07:39] Process menu...
[09:07:39] Copy main resources
[09:07:41] Documentation generated in ./documentation/ in 4.405 seconds using gitbook theme
[09:07:41] Serving documentation from ./documentation/ at http://127.0.0.1:8080
^CTerminate batch job (Y/N)? y

Angular Version

Angular CLI: 8.3.21
Node: 12.13.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.803.21
@angular-devkit/build-angular 0.803.24
@angular-devkit/build-optimizer 0.803.24
@angular-devkit/build-webpack 0.803.24
@angular-devkit/core 8.3.21
@angular-devkit/schematics 8.3.21
@angular/cdk 8.2.3
@angular/cli 8.3.21
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.2.3
@ngtools/webpack 8.3.24
@schematics/angular 8.3.21
@schematics/update 0.803.21
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
C:\Project\Prototypes\analytic-ui-app>compodoc -p tsconfig.app.json -s

@duxor
Copy link

duxor commented Mar 18, 2020

any news?

@Azgeb
Copy link

Azgeb commented Mar 20, 2020

Can confirm the bug

1.1.11

TypeScript version used by Compodoc : 2.9.1

TypeScript version of current project : 3.7.5

Node.js version : v12.16.0

Operating system : Windows 10

[07:21:04] No configuration file found, switching to CLI flags.
[07:21:04] Using tsconfig file : C:***\src\tsconfig.app.json
[07:21:04] Searching package.json file
[07:21:04] package.json file found
[07:21:04] Processing package.json dependencies
[07:21:04] Searching README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, TODO.md files
[07:21:04] README.md file found
[07:21:04] Error during C:*
**\CHANGELOG read
[07:21:04] Continuing without CHANGELOG.md file
[07:21:04] Error during C:***\CONTRIBUTING read
[07:21:04] Continuing without CONTRIBUTING.md file
[07:21:04] Error during C:*
**\LICENSE read
[07:21:04] Continuing without LICENSE.md file
[07:21:04] Error during C:***\TODO read
[07:21:04] Continuing without TODO.md file
[07:21:04] Get dependencies data
[07:21:04] parsing : C:/
///src/main.ts
[07:21:04] parsing : C:/
///src/polyfills.ts
[07:21:04] -------------------
[07:21:04] Project statistics
[07:21:04] -------------------
[07:21:04] Prepare components
[07:21:04] Prepare modules
[07:21:04] Process documentation coverage report
[07:21:04] Process main graph
(node:18080) V8: C:*
***\AppData\Roaming\npm\node_modules@compodoc\compodoc\node_modules\viz.js\viz.js:33 Invalid asm.js: Function definition doesn't match use
[07:21:04] Process pages
[07:21:04] Process page : coverage
[07:21:04] Process page : dependencies
[07:21:04] Process page : index
[07:21:04] Process page : modules
[07:21:04] Process page : overview
[07:21:04] Process menu...
[07:21:04] Copy main resources
[07:21:04] Documentation generated in ./documentation/ in 0.876 seconds using gitbook theme
[07:21:04] Serving documentation from ./documentation/ at http://127.0.0.1:8080

Angular CLI: 9.0.2
Node: 12.16.0
OS: win32 x64

Angular: 9.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.900.2
@angular-devkit/build-angular 0.900.2
@angular-devkit/build-optimizer 0.900.2
@angular-devkit/build-webpack 0.900.2
@angular-devkit/core 9.0.2
@angular-devkit/schematics 9.0.2
@angular/cdk 9.0.0
@angular/cli 9.0.2
@angular/material 9.0.0
@ngtools/webpack 9.0.2
@schematics/angular 9.0.2
@schematics/update 0.900.2
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2

@james-begg
Copy link

james-begg commented Mar 20, 2020

I'm having the same issues, but with Angular 7:
"@angular/animations": "~7.1.0",
"@angular/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "~7.1.4",
"@angular/compiler-cli": "~7.1.0",
"@angular/language-service": "~7.1.0",

node: 13.6.0
npm: 6.13.4

@cre8
Copy link

cre8 commented Mar 25, 2020

After switching from -p tsconfig.app.json to -p tsconfig.json it worked. We have both files, but I think compodoc does not understand that tsconfig.app.json extends the tsconfig.json file since both are written in JSON and there is no such thing as dependency.

Angular: 9
Compodoc: 1.1.11
Node: 12.16
OS: Windows 10

@Azgeb
Copy link

Azgeb commented Mar 25, 2020

@cre8 Thank you so much, this was indeed my problem.

But maybe compodoc should throw an error.

@duxor
Copy link

duxor commented Mar 27, 2020

Works with npx compodoc -p tsconfig.json

Angular: 9.1.0
Compodoc: 1.1.11
Node: 13.5.0
OS: Ubuntu

@stale
Copy link

stale bot commented May 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 26, 2020
@stale
Copy link

stale bot commented Jun 2, 2020

This issue has been automatically closed because it has not had recent activity. Please file a new issue if you are encountering a similar or related problem. Thank you for your contributions.

@stale stale bot closed this as completed Jun 2, 2020
@TechieWithBeard
Copy link

i also had same issue for angular 10, fixed it by

"compodoc": "npx compodoc -p tsconfig.base.json",
 `"serve-compodoc":` "npx compodoc -s tsconfig.base.json"

in package.json

@rafaelblink
Copy link

@vishnuramero thank you buddy!

@juandcg0331
Copy link

juandcg0331 commented Aug 14, 2020

Check the path for the tsconfig property in the angular.json file. Correcting that path should fix this error.
"architect":{ .... .... .... "tsConfig": "**src**/tsconfig.app.json", .... .... .... }
Replace path for src
Angular : 10

@WahabShah23
Copy link

@cre8 Thanks mate. This works like a charm.

@abhiram90
Copy link

  1. I have used this link to install compodoc

  2. With default settings it will point to port 8080 and gave error because that port was already in use.

image

  1. I have changed below in my package.json file to use a different port and it worked.

image

  1. Finally run "npm run serve-docs" below URL will open in browser.

http://127.0.0.1:5200/overview.html

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

No branches or pull requests