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.

Numerous issues with Angular Compodoc since v6.4.0-alpha.34

See original GitHub issue

I’m experiencing numerous issues with Angular in newer versions of Storybook. It seems they are all related to Compodoc. These issues include:

  • Arrays are interpreted as strings
  • Enums are not correctly interpreted
  • EventEmitters throw errors

I tracked down the version when this started happening and I found out that these issues started to occur in v6.4.0-alpha.34 (in v6.4.0-alpha.33 everything is fine). I assume it is related to this pull request: #15744

Note: These issues are also still present in latest 6.5.0-alpha.26

Reproduce:

Clone this repository: https://github.com/decline/storybook-angular-issues

There are 3 stories that describe what is going wrong.

See errors in v6.4.0-alpha.34:

yarn && yarn storybook

See it working in v6.4.0-alpha.33:

git checkout 6.4.0-alpha.33
yarn && yarn storybook

As soon as you remove the setCompodocJson(docJson); line in .storybook/preview.js it will also work in v6.4.0-alpha.34, but then you will also lose Compodoc support 😕

I also recorded a video that shows the comparison between the two versions:

https://user-images.githubusercontent.com/5609744/151581283-fa3f5def-5371-47e7-8054-311fef8703a0.mov

Environment Info:

  System:
    OS: macOS 11.6.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
    Yarn: 3.1.1 - /usr/local/bin/yarn
    npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
  Browsers:
    Chrome: 97.0.4692.99
    Firefox: 96.0.2
    Safari: 15.3
  npmPackages:
    @storybook/addon-actions: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/addon-docs: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/addon-essentials: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/addon-links: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/angular: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/builder-webpack5: 6.4.0-alpha.34 => 6.4.0-alpha.34 
    @storybook/manager-webpack5: 6.4.0-alpha.34 => 6.4.0-alpha.34 

Additional context:

Issue https://github.com/storybookjs/storybook/issues/17302 is related to this one, I will close that issue in favour of this new one here.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:14
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
rajeshkannan31commented, Jul 29, 2022

Hi,

Any plans to fix this issue. Thank you.

0reactions
amainocommented, Feb 4, 2022

@decline it could also be related to this PR which also went out in v6.4.0-alpha.34 #15881

Thanks for tracking this down!

I have looked into #17004 and it is connected to the removal of eval. I have created a PR to fix this but having some problem with tests https://github.com/storybookjs/storybook/pull/17353

Read more comments on GitHub >

github_iconTop Results From Across the Web

Properties with controls use name of the assigned variable ...
I'm using Angular with compodoc and I know there are limitations due to the way compodoc works. Rendering controls for properties does however...
Read more >
Installation
Angular -CLI ... Just run Compodoc in a fresh or existing project. Global installation. Install from npm : npm install -g @compodoc/compodoc. If...
Read more >
Options, quotes and Windows usage
Configuration file. You can provide a configuration file in the root of your project folder. Compodoc will search files like : .compodocrc, .compodocrc.json ......
Read more >
13 - tips and tricks
Table of Contents. Styling the documentation; Documentation of each component, module, directives etc; Additional documentation; Documentation of several ...
Read more >
Options
-w, --watch, Watch source files after serve and force documentation rebuild. -e, --exportFormat [format], Export in specified format (json, html (default)).
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