2015-06-20 69 views
1

我想使用Grunt將scss文件編譯爲css,但由於未知原因,我失敗了。grunt-contrib-sass在Windows中不起作用

這裏是我的Gruntfile.js

module.exports = function(grunt) { 

    grunt.initConfig({ 
     bower: { 
      install: { 
       options: { 
        targetDir: 'dependencies', 
        cleanup: true, 
        layout: 'byComponent' 
       } 
      } 
     }, 
     sass: { 
      foundation: { 
       files: { 
        'a.css': 'a.scss' 
       } 
      } 
     } 
    }); 

    grunt.loadNpmTasks('grunt-bower-task'); 
    grunt.loadNpmTasks('grunt-contrib-sass'); 

    grunt.registerTask('dependencies', ['bower:install']); 
    grunt.registerTask('assets', ['sass:foundation']); 
}; 

我收到以下錯誤:

> grunt assets 
Running "sass:foundation" (sass) task 
Warning: spawn C:\Windows\system32\cmd.exe;C\MySQL\bin ENOENT Use --force to continue 

Aborted due to warnings. 

我在做什麼錯?

+0

錯誤而不是複製/粘貼錯誤? – cimmanon

回答

2

我解決了這個問題,在安裝「咕嚕-的contrib - 薩斯」:「^ 0.8.1」(這是一個老版本,但它的作品對我來說)你爲什麼要張貼的截圖

"devDependencies": { 
"grunt": "^0.4.5", 
"grunt-contrib-sass": "^0.8.1" 
} 
相關問題