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

Failing build due to addon.sass not found #581

Open
2 tasks
BobrImperator opened this issue Jul 18, 2018 · 5 comments
Open
2 tasks

Failing build due to addon.sass not found #581

BobrImperator opened this issue Jul 18, 2018 · 5 comments

Comments

@BobrImperator
Copy link

The problem

When attempting to use ember-table in a project, that uses sass files for styles, then the build fails.
This happens by default here, because ember-table has styles in both
addon and app directories.

image

Fix

As documented in https://github.com/aexmachina/ember-cli-sass#alternative-addon-usage
The Table does exactly that, but as mentioned there are styles inside addon directory as well, and they mustn't be there, because that's The Problem.

  • delete addon/styles
  • document that the addon consumer should import the styles to their project like this:
@import 'ember-table/default'
@pzuraq
Copy link
Contributor

pzuraq commented Jul 18, 2018

If this is going to be an issue I think we should stop relying on Sass for our addon styles and convert it to plain CSS. The styles are very minimal, we don't really need a preprocessor.

@ohcibi
Copy link

ohcibi commented Aug 18, 2018

I added a quickly translated with searchnreplacing the {}; addon.sass and put it in the addon/styles directory and the errors was gone. I configured my project to use sass instead of scss so that might be the reason why it tries to pick up the wrong one. It might have to do with adopted-ember-addons/ember-cli-sass#163 as several addons are reporting issues regarding that error message.

@kpfefferle
Copy link
Member

I'm now working on a project that does not use Sass or ember-cli-sass, and it's extremely difficult to get this working since it only ships Sass. If this addon shipped plain CSS instead, it would be much easier to integrate with any project's CSS pipeline.

I'm going to create a branch with plain CSS so that our team can look at it and discuss the merits of changing the approach.

@ohcibi
Copy link

ohcibi commented Mar 11, 2020

It would be convenient to have a hotfix regarding deletion of addon/styles as this would fix failing builds for project that use .sass as an extension. The underlying problem is from ember-cli-sass anyways so the long term fix would indeed be to avoid using sass at all (although its not a problem to use it as long as there is no addon.(scss|sass) file)

@icyrizard
Copy link

icyrizard commented Mar 24, 2020

This is apparently still an issue. I'm testing out this library to see if it's something for our project. We recently moved away from compass and are using ember-cli-sass in combination with sass (not node-sass as that gives a whole other list of problems installing). My solution is to add this in the package.json within the script tag:

"scripts": {
   "postinstall": "rm -rf node_modules/ember-table/addon/styles"
},

After that it stopped complaining / crashing.

I also added this to styles/app.scss

@import 'ember-table/default'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants