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

Compilation issue with docgenInfo.json (windows) #307

Closed
joshuazmiller opened this issue Jun 28, 2016 · 4 comments
Closed

Compilation issue with docgenInfo.json (windows) #307

joshuazmiller opened this issue Jun 28, 2016 · 4 comments

Comments

@joshuazmiller
Copy link
Contributor

Sorry for bringing up another compilation issue.

The file docs/app/utils/getComponentDocInfo.js is returning undefined (checked via console.log) for docPath and docGen . It is supposed to get docPath by parsing the docgenInfo.json file that was generated by the build process on my Windows machine. (It seems to be looking for _meta.name which doesn't appear in the docgenInfo file). This doesn't appear to work. The result is that my app won't compile and I get the following 3 messages in my console:

Warning: Failed propType: Required prop docPath was not specified in ComponentDescription. Check the render method of ComponentDoc.
Warning: Failed propType: Required prop docgen was not specified in ComponentDescription. Check the render method of ComponentDoc.
Uncaught TypeError: Cannot read property 'props' of undefined

Note: The last error is referring to line 21 in ComponentDoc.js:

Here's the content of my auto-generated docgenInfo.json:
docgenInfo.json.txt

@levithomason
Copy link
Member

The content of your docgenInfo.json looks correct. Though, it shouldn't be named .txt. I assume you renamed this file?

What is the full path to the docgenInfo.json file on your machine?

@joshuazmiller
Copy link
Contributor Author

Yes, I just copied the contents into a .txt file so I could include it here. The full path is C:\Users\Joshua\Dropbox\GitHub\stardust\docs\app\docgenInfo.json

@levithomason
Copy link
Member

Since the file is present, and the the contents are correct, I cannot see any reason why the import would be undefined. I am not a Windows user so I am unsure if that has anything to do with it.

This may be related to #304 which does have errors we can diagnose. Let move this conversation about the undefined import to there as well.

@joshuazmiller
Copy link
Contributor Author

This is resolved. Just the regex for Windows file paths was the issue as @davezuko mentioned in #304. Thanks!

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

No branches or pull requests

2 participants