0

I'm trying to run a basic app with gruntjs. Everything works fine, but once I try to run my sass-related grunt task, I have this error:

$ grunt sass
Running "sass:dist" (sass) task
Warning: spawn ENOENT Use --force to continue.

I already have installed Ruby and Sass, and Nodejs. This is my Gruntfile.js:

module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
  dist: {
    options: {
      style: 'expanded'
    },
    files: {
      'css/main.css': 'css/main.scss'
    }
  }
},
watch: {
  css: {
    files: ['css/main.scss'],
    tasks: ['sass']
  }
},
});
grunt.loadNpmTasks('grunt-contrib-sass');

grunt.registerTask('default', ['sass']);

};

Ruby and Sass versions:

$ ruby -v
ruby 2.0.0p598 (2014-11-13) [x64-mingw32]
$ sass -v
Sass 3.4.9 (Selective Steve)

Ruby Path is already in my PATH variable.

rick_zan
  • 71
  • 10
  • just a quick sanity check: do you have `grunt-contrib-sass` installed in your project? – Jordan Foreman Dec 22 '14 at 21:53
  • @JordanForeman yep, npm install --save-dev grunt-contrib-sass. The devDependency is in my package.json file – rick_zan Dec 22 '14 at 21:57
  • Looks like the paste didn't take :p but that's cool...I believe you. That's my initial guess at this...usually Error: ENOENT means something isn't installed correctly. Take a look at this http://stackoverflow.com/questions/17516772/using-nodejss-spawn-causes-unknown-option-and-error-spawn-enoent-err – Jordan Foreman Dec 22 '14 at 21:59
  • @JordanForeman read but not entirely understand this concept: how is this supposed to help me? typing npm.cmd install [x] instead of using "npm" command? Maybe Ruby isn't installed correctly – rick_zan Dec 22 '14 at 22:06
  • no idea. My guess is maybe that this is an oddly specific windows bug, and that question seemed like it could be relevant. I don't think I'll be much use here, sorry. But I'll keep your question in mind in case I come across a solution. – Jordan Foreman Dec 22 '14 at 22:09
  • Thanks so much @JordanForeman . I think is a specific windows bug related to npm and Ruby(I've the same problem with gulpjs: http://stackoverflow.com/questions/27197701/gulp-missing-the-sass-executable) and I hope someone can clarify this problem because they both are great tools :( – rick_zan Dec 22 '14 at 22:14

0 Answers0