-
Notifications
You must be signed in to change notification settings - Fork 55
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
"Individual stylesheets must be in the sass directory." #61
Comments
You have wrong path with config.rb:
gulp config
|
The config_file is relative to the project path, because now I get an error of
|
I am also getting "Individual stylesheets must be in the sass directory." Think it might be an issue with a newer version of compass |
I fixed this by getting rid of gulp-compass altogether and using a plain 'ol node compass wrapper: https://www.npmjs.org/package/compass The gulp task is muuuuch simpler, too, using a config.rb:
Edit: I needed source maps, so I just went straight for exec:
|
@crobays Would you mind dump project files and send to me by email? My mail account is |
I'm getting the same errors since I've upgraded Compass to v1.0.1. Before, the task was running fine. Could be related to Compass/compass#1769. |
same here |
Remove |
I'm getting the same error with compass 1.0.0. Project is here, if it helps at all. |
@Gastove Thanks your project. I will try it. Could you provide |
Yes! Apologies. I've tried |
In my case, the fix was remove the "." from sass folder at config.rb and gulpfile.js compass options. sass (3.4.4) |
Yep. @Nevitones suggestion fixed it for me also. This seems to only effect places with a gulp.task('compass', function() {
return gulp.src('./js/sass/*.scss')
.pipe(compass({
config_file: './compass.rb',
css: './build/stylesheets',
sass: './js/sass'
}))
.on('error', handleErrors);
}); only changes to: gulp.task('compass', function() {
return gulp.src('./js/sass/*.scss')
.pipe(compass({
config_file: './compass.rb',
css: './build/stylesheets',
sass: 'js/sass' // removed the dot-slash from here
}))
.on('error', handleErrors);
}); Likewise, in my |
Totally stuck with this issue. Is the only thing that is stopping me from having my dreamed workflow. Im not able to make a gulp compass task that behaves as I expect. Giving the following enviroment: sass: Sass 3.4.5 (Selective Steve) This is my file structure:
This is my config.rb:
This is my gulfpfile.js
Tried all solutions posted here, no success at all. Always getting the following error:
Have to use some tweaks (like somebody who saids he commented this part on compass js -> But anyway, no way to make it work. This is almost the same example thats on the github page. How do you guys use gulp-compass ? I really would love to have this working. Thanks a lot ! |
@Avcajaraville I will try your file structure. |
@Gastove Thank you!!! Your suggestion works for me. |
@appleboy Really looking forward for your feedback ! Plus, I also have found very large compilation time for a structure with 40+ sccs (with partials). Thanks ! |
I experienced this problem because I was trying to use relative directories for So in short, use |
@nrutman Great! I will fix the relative path. |
為什麼這個錯誤總是存在, 找不到解決的方法 |
@noyobo Please try 1.3.3 version. |
@appleboy All right now, 3Q |
Hi, sorry to add an issue even you 've closed, but i got the same error message, suspecting an extra path added in my config.rb causing this error : The error message
i've updated to the latest gulp compass package and gems, and tried all the solutions mentioned here, but with no success. Any idea ? |
@mistergraphx I have met the same problem so I wrote one such demo, hope to help you |
yep, thx for sharing ... it's work fine when the config.rb is near my gulp file (like in your demo). Maybe it's not possible to do what i want ... |
@mistergraphx So, I created this repo https://github.com/noyobo/gulp-compass-compile |
@mistergraphx Could you provide gulp config and file structure? |
@noyobo : ok i'm gonna test today without a config.rb @appleboy Yes, shure thx: File structure:
gulp.js
Config.rb
|
I still have that error even I have changed configuration in config.rb |
+1 same here, unix only, windows ok When I turn on the debug mode of
And it fails with the "Individual stylesheets..." error. However, when I run the command from debug in the prompt, it compiles the styles flawlessly. |
Kept getting "Individual stylesheets must be in the sass directory", so I just resorted to: var exec = require('child_process').exec;
gulp.task('compass', function() {
exec('compass compile');
}); |
I fixed it by using fs.realPath in "project", so I went from this: gulp.src('src/scss/*.scss')
.pipe(compass({
project: __dirname + '/..',
sass: 'src/scss',
css: 'build'
}) to this: gulp.src('src/scss/*.scss')
.pipe(compass({
project: fs.realpathSync(__dirname + '/..'),
sass: 'src/scss',
css: 'build'
}) |
@WishCow OMG, the first thing that worked! Thanks dude! |
@WishCow Works for me too, thanks for you suggestion. 👍 |
I found that the sass and css path's in my config.rb and gulpfile.js needed to be different: So given these paths in my config.rb (located in assets/styles/):
My gulpfile.js (located in the root directory) looked like this:
Versions: |
Adding "sass_path = File.expand_path("..", FILE)" to the config.rb fixed this for me. |
I came across this issue today, although my fix was slightly different. It would seem that 'css' and 'sass' options are mandatory, and are not automatically read from the I'd like to suggest that This works;
This does not
|
@foxx Thanks and I'd like to +1 your suggestion for changing the defaults to use whatever is in the config file. |
i came across the same issue using @foxx solution fixed it +1 for his sugesstion! i also want to point out that some other defaults are twisted: a preferred_syntax option would be also a good thing... |
Well in my case it pretty simply boils down to this; thanks for alle the comments which eventually helped me out. The following configuration: gulp.task('icons.sass', function() {
gulp.src('../Packages/Application/Acme/Resources/Private/Styles/Icons.scss')
.pipe(compass({
css: '../Web/_Resources/Built/Styles/',
sass: '../Packages/Application/Acme/Resources/Private/Styles/'}))}); results in the following command executed (each argument in a new line for better readability): /usr/bin/compass compile
/Users/afoeder/PhpstormProjects/acme/Distribution/Build
/Users/afoeder/PhpstormProjects/acme/Distribution/Packages/Application/Acme/Resources/Private/Styles/Icons.scss
--no-line-comments
--relative-assets
--debug-info
--css-dir ../Web/_Resources/Built/Styles/
--sass-dir ../Packages/Application/Acme/Resources/Private/Styles/ so, while the compass CLI itself seems to work fine with relative paths for the
resulted in
which works as expected. |
tuckerconnelly, thank you! All day i was trying to compile my files with gulp-compass, in the evening i tried to do it with node.js compass. It works, thank you! |
WHY? Here's how it works:for those finding these pages and getting confused about what is happening, let me show you an excerpt from the compass ruby-based compiler:
When attempting to create the output css file, the compiler needs to know what to call it. it also needs to place the file in the proper hierarchy (hence why it can't simply obtain the file's basename). therefore it attempts to find the index of
I hope this helps future people debug the issue. I'm reading this from |
I had the same issue. Solution:
gulp.src('web/backend/stylesheets/*.scss')
.pipe(compass({
config_file: 'web/backend/config.rb',
css: 'web/backend/css',
sass: 'web/backend/stylesheets',
relative: true
})); Related: #82 |
@steven-klein this work for me also, thanks. |
i get this error, when set output_style as compressed without : output_style = compressed // get error : individual stylesheets must be in the sass directory'' |
@appleboy I keep getting the error "Individual stylesheets must be in the sass directory.":
gulp.task('styles', ['clean'], function () {
});
require 'compass/import-once/activate' http_path = '/'
|-- bower_components |
I've been trying to fix this and can't figure out how to do it. I got the following compass task:
With the following directory structure:
I've been trying many solutions, but can not figure out how to solve this. |
Today I also had such an error. I debugged it and found the reason. By mistake, I put file named plugin.scss to one of the subdirectories. but subdirectories has to contain only files named _plugin.scss, i. e. includes. |
Getting an error and I don't know if or what I do wrong:
gulpfile.js:
config.rb:
file system:
Sass 3.4.0.rc.3
Compass 1.0.0.rc.1 (Polaris)
Gulp 3.8.7
Gulp-compass 1.3.0
The text was updated successfully, but these errors were encountered: