quaertym / ember-cli-compass-compiler

Ember CLI Compass Compiler
MIT License
28 stars 23 forks source link

Error in ember-cli-0.2-beta.1: app/styles/app.[scss|sass] does not exist #45

Closed lessless closed 9 years ago

lessless commented 9 years ago

Hello! Today I tried to update to ember-cli-0.2-beta.1 and encountered an error

ember serve
version: 0.2.0-beta.1
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
Warning: ignoring input sourcemap for bower_components/route-recognizer/dist/route-recognizer.js because ENOENT, no such file or directory '/Users/lessless/Code/js/xk21/tmp/tree_merger-tmp_dest_dir-QCtdKlrH.tmp/bower_components/route-recognizer/dist/route-recognizer.js.map'
/Users/lessless/Code/js/xk21/tmp/compass_compiler-tmp_dest_dir-eO9F4tyq.tmp/app/styles/app.[scss|sass] does not exist

though i renamed xk21.scss to app.scss

lolmaus commented 9 years ago

Also upgraded to Ember CLI 0.2.0-beta.1 and running into this issue. Please help!

lolmaus commented 9 years ago

Okay, this only happens when your project uses both ember-cli-compass-compiler and broccoli-sass.

Removing broccoli-sass resolved the issue for me.

This problem is being tracked here: https://github.com/ember-cli/ember-cli/issues/2363

Also, this Ember CLI changelog note is relevant to the upgrade to Ember CLI 0.2.0-beta.1:

Usage of the included hook to add items to the registry will need to be refactored to use the newly added setupPreprocessorRegistry hook instead.

quaertym commented 9 years ago

@lolmaus I am glad your issue is solved. It was mentioned in the README.

@lessless Is this fixed for you as well?

lolmaus commented 9 years ago

@quaertym, this kinda means that ember-cli-compass-compiler makes the project incompatible with all addons using broccoli-sass, and there are quite a few of them.

I hope i'm wrong...

lolmaus commented 9 years ago

Somehow, having both ember-cli-compass-compiler and broccoli-sass in one project works for me again. My main stylesheet is compiled with Compass and an addon's stylesheet is compiled with libsass.

PS I'm on Ember CLI 0.2.0.

quaertym commented 9 years ago

@lolmaus It can be due to recent improvements in ember-cli that allows addons to have their own preprocessors. It would be great if we can link here related pull requests. Then we can close this.

lolmaus commented 9 years ago

Not until https://github.com/ember-cli/ember-cli/issues/2363 is fixed.

Also, ember-cli-notifications, the addon i'm using that relies on broccoli-sass literally has no code specific to the preprocessor. It only has an app/styles folder with some Sass code and it mentions broccoli-sass in package.json's devDependencies (and thus, assumes the user manually requires broccoli-sass in his project's package.json).

I wonder why ember-cli-compass-compiler does not compile that addon's Sass.

lessless commented 9 years ago

@lolmaus @quaertym what about this workaround https://github.com/ember-cli/ember-cli/issues/2363#issuecomment-62434753?

quaertym commented 9 years ago

@lolmaus ember-cli-compass-compiler only compiles files under app/styles/ it does nothing about addon's sass files. If it is possible for addons to use their own preprocessors, addon developers can use ember-cli-compass-compiler inside their addons then..

@lessless That could work but every addon that depends on broccoli-sass should implement it.