0

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.

cimmanon
  • 67,211
  • 17
  • 165
  • 171
Darklizard
  • 377
  • 4
  • 17

1 Answers1

1

Here uninstall your 0.4.0 version of grunt-contrib-sass by running below command.

npm uninstall grunt-contrib-sass

Now, Install 0.3.0 version of grunt-contrib-sass by executing below command.

npm install grunt-contrib-sass@0.3.0

Hope It will work.

You can see issue logged here regarding this.

Satyam Koyani
  • 4,236
  • 2
  • 22
  • 48