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

Warning: Task "compass" not found. Use --force to continue. #294

Closed
ldexterldesign opened this issue Feb 24, 2014 · 15 comments
Closed

Warning: Task "compass" not found. Use --force to continue. #294

ldexterldesign opened this issue Feb 24, 2014 · 15 comments

Comments

@ldexterldesign
Copy link

Hey,

Is anyone able to help me fix this error? It's quite annoying as my terminal pops everytime I save out my code?

screen shot 2014-02-24 at 18 43 09

screen shot 2014-02-24 at 18 43 18

Yours hopefully,

@shama
Copy link
Member

shama commented Feb 24, 2014

Is grunt-contrib-compass installed and loaded?

@ldexterldesign
Copy link
Author

Hey,

Thanks for reply

Yea, although I suspect I may need to do this: https://github.com/gruntjs/grunt-contrib-compass#watch - I'll look into it and report back if I'm still stuck

Cheers,

@ldexterldesign
Copy link
Author

... if anyone has a sample Gruntfile.js file with the following setup they can gist I'd be grateful:

Cheers,

@jamesplease
Copy link
Member

@ldexterldesign, generator-webapp might be a good place to start.

@shama
Copy link
Member

shama commented Feb 24, 2014

The watch option there uses compass watch which uses compass's built-in watch. I don't recommend it unless you're only compiling scss files (but then one would just use compass watch directly). It greatly complicates things to save fractions of time and I have no idea why it was implemented in that task.

The warning Task "compass" not found. comes from the task not being installed and loaded. Install with npm i grunt-contrib-compass --save-dev and grunt.loadNpmTasks('grunt-contrib-compass');.

@ldexterldesign
Copy link
Author

@shama

Thanks, I'm only compiling .scss files, yea

I've run those commands and still get the error?

Do you think I should look into https://github.com/sindresorhus/grunt-concurrent ?

Cheers,

@ldexterldesign
Copy link
Author

@jmeas

Ahh, I think I finally understand the purpose of http://yeoman.io/ :P

Cheers,

@shama
Copy link
Member

shama commented Feb 24, 2014

The yeoman generator contains lots of fun things, most of which you don't need.

Here is a simple example that uses grunt-contrib-watch to compile with compass:

module.exports = function(grunt) {
  grunt.initConfig({
    compass: {
      dist: {
        options: {
          sassDir: 'sass',
          cssDir: 'css',
          environment: 'production',
        },
      },
    },
    watch: {
      css: {
        files: ['sass/*.scss'],
        tasks: ['compass'],
      },
    },
  });
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-compass');
  grunt.registerTask('default', ['compass']);
};

@shama shama closed this as completed Feb 24, 2014
@thowar2
Copy link

thowar2 commented Jan 15, 2016

I had the same error, which I solved by installing the compass ruby gem: sudo gem install compass

@rogerywoo
Copy link

I also had the same problem on Windows. After installing compass, make sure your path includes the path to ruby.

@baranirajarathinam
Copy link

I am also getting the same Warning: not found: compass Use --force to continue.
image
i tried installing the compass seperately as well, no luck. Also, what do you mean by "make sure your path includes the path to ruby."?

@rogerywoo
Copy link

Your PATH environment variable needs to include the directory where Ruby was installed.

@jeremylv1992
Copy link

I install yo and yo angular. Here is a angular project, I run "grunt server" > get the same error.

image

@arsenk01
Copy link

arsenk01 commented Sep 12, 2018

I had the same issue on Windows and running gem install compass fixed the problem.

@lili0allen
Copy link

try the solution Compass/compass#2129 (comment)

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

9 participants