Skip to content

Conversation

@diegoazh
Copy link

@diegoazh diegoazh commented Jun 1, 2023

I started with a configuration problem after updating some dependencies, getting the below error

Screenshot 2023-06-01 at 16 20 16

After debugging it I detected that the extractConfig method returns only an object with the components property on it

Screenshot 2023-06-01 at 16 23 45

and on case 1 when it tray to use config.componentsRoot that property is undefined and makes the path function throws the error shown in the first print.

I checked the extractConfig method on vue-docgen-cli. I discovered that this method was converted to an async function which causes this new behaviour because the configuration from vue-docgen-cli is created successfully as you can see in the below screenshot.

Screenshot 2023-06-01 at 16 26 30

To resume the function does not wait and the config object is set only with the components property because from vue-docgen-cli v4.64.0 extractConfig method is async and we need to wait until it resolves the config.

As an extra check, we can confirm this change on the following commit.

and we also can confirm that on NPM in the new code tab

Screenshot 2023-06-01 at 16 17 11

In previous versions, this method was not async

Screenshot 2023-06-01 at 16 18 20

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@GreenImp
Copy link
Contributor

GreenImp commented Jul 6, 2023

It would be really helpful to have this merged in. I've hit this issue, and a related issue in the same file.

I've also raised a PR #62 for an unrelated issue, but I've copied your fix into it, as I couldn't proceed without it (So thank you for your fix!).

@ph1p
Copy link
Owner

ph1p commented Jul 9, 2023

Thank you! :) Fixed in @GreenImp PR

@ph1p ph1p closed this Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants