I'm trying to use grunt sass to compile my css files, and here is the Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'css/app.css': 'scss/app.scss'
}
}
},
watch: {
grunt: {
files: ['Gruntfile.js']
},
css: {
files: '**/*.scss',
tasks: ['sass']
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
}
However, it always return the error below when I use "grunt" command to watch it and make changes to any sass file in sass/ directory.
Running "sass:dist" (sass) task
Warning: Arguments to path.join must be strings Use --force to continue.
Is there any way I can fix it? It's string already.