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

After 2.1.0 update - ERROR: Unable to exclude default styles #1128

Closed
dlangston opened this issue Jan 24, 2018 · 7 comments
Closed

After 2.1.0 update - ERROR: Unable to exclude default styles #1128

dlangston opened this issue Jan 24, 2018 · 7 comments

Comments

@dlangston
Copy link

I was getting the same default style bug on clean build as described here #1115

I updated to 2.1.0 because it is suppose to have a fix for this issue, however once I update to 2.1.0 I receive the following error when I run gulp -
ERROR: Unable to exclude default styles

I thought it might be related to the includeDefaultStyles but I am not using this and adding it to my gulp file doesn't seem to effect the outcome. Any help would be greatly appreciated because I am having to revert back to version 1.7.0 to not have the default style bug issue.

Also, I found that if you run gulp twice after a clean build the style bug seems to fix itself. Not sure why?

@junaidrsd
Copy link
Contributor

@dlangston I think you're missing dist folder try running this task first

gulp build

@dlangston
Copy link
Author

@junaidrsd Thanks for the reply. I haven't needed to run gulp build in the past, is this new? I currently don't have a build task in my gulp file so it fails if I run it. Up until now we have just installed SC5 via npm then ran the default gulp task, staticStyleguide. Thanks again for the help.

@junaidrsd
Copy link
Contributor

This isn't new this task is a dependency to main tasks. Somehow it did not perform or dist folder might got deleted for some reason. I think I need to display meaningful error message.

@dlangston
Copy link
Author

So what is the best way to make sure the dist folder is added?

@junaidrsd
Copy link
Contributor

Dist folder is always there unless one delete it accidentally. I'm 100% occupied with other things otherwise there can be better ways to handle this situation.

@kasparsd
Copy link
Contributor

kasparsd commented Mar 16, 2018

I had the same issue with a fresh build and adding includeDefaultStyles: true to our config fixed it. This happens because generate() in lib/styleguide.js uses the direct input of options.includeDefaultStyles instead of the parsed version available after sanitizeOptions().

So the readme is actually wrong because the default is not true:

**includeDefaultStyles** (boolean, optional, default: true)

@kasparsd
Copy link
Contributor

Fix available in #1130.

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

3 participants