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

Fixed error reporting showing 'file is not defined' #173

Merged
merged 1 commit into from
Aug 26, 2016
Merged

Fixed error reporting showing 'file is not defined' #173

merged 1 commit into from
Aug 26, 2016

Conversation

adriantoine
Copy link
Contributor

Hi!

The file variable should be set outside of the try statement because it is used in the catch error reporting. So when there's an error parsing a file I will only get:

ERROR in ./~/react-styleguidist/loaders/props.loader.js!./src/components/modal/prompt/Prompt.js
Module build failed: ReferenceError: file is not defined
    at Object.module.exports (/Users/adrien/Projects/dev-setup/tray/src/github.com/trayio/react-ui/node_modules/react-styleguidist/loaders/props.loader.js:41:66)
 @ ./~/react-styleguidist/loaders/styleguide.loader.js! 4:19905-20030
 @ ./~/react-styleguidist/src/index.js
 @ multi main

and after this fix I get the right error message:

Error when parsing src/components/modal/prompt/Prompt.js
Error: No suitable component definition found.

@sapegin sapegin merged commit 04bcbd7 into styleguidist:master Aug 26, 2016
@sapegin
Copy link
Member

sapegin commented Aug 26, 2016

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

Successfully merging this pull request may close these issues.

None yet

2 participants