PC Specs: Windows 7 Enterprise x64
I'm running grunt.js on a project and recently started receiving an error when attempting to run 'grunt watch'.
Grunt worked fine yesterday but today I started seeing:
Running "watch" task Waiting...Fatal error: listen EACCES
I read another question here: Cloud 9 and Grunt.js
that lead me to remove 'options: {livereload: true}' from Gruntfile.js
running watch again works as intended. Is there a way to reconfigure grunt or livereload to get livereload working with Grunt again?
Also, just running the command 'grunt' runs all of the tasks without errors.
Thanks.
Edit: Gruntfile.js follows:
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: ['js/src/*.js']
},
uglify: {
options: {
mangle: {
except: ['jQuery']
},
preserveComments: 'none'
},
'js/main.min.js': ['js/tmp/debug.js']
},
compass: {
options: {
config: '.compass.rb',
sassDir: 'sass',
cssDir: '.'
},
my_target: {
}
},
cmq: {
my_target: {
files: { 'tmp': ['style.css'] }
}
},
cssmin: {
minify: {
keepSpecialComments: 0,
expand: true,
cwd: 'tmp/',
src: ['style.css'],
dest: '.',
ext: '.css'
}
},
imagemin: {
png: {
options: {
optimizationLevel: 7
},
files: [{
expand: true,
cwd: 'img',
src: ['**/*.png'],
dest: 'img',
ext: '.min.png'
}]
},
jpg: {
options: {
progressive: true
},
files: [{
expand: true,
cwd: 'img',
src: ['**/*.jpg'],
dest: 'img',
ext: '.min.jpg'
}]
},
gif: {
options: {
progressive: true
},
files: [{
expand: true,
cwd: 'img',
src: ['**/*.gif'],
dest: 'img',
ext: '.min.gif'
}]
}
},
clean: ["tmp"],
watch: {
scripts: {
files: 'js/src/*.js',
tasks: ['jshint', 'concat', 'uglify', 'clean'],
options: { livereload: true }
},
css: {
files: 'sass/*.scss',
tasks: ['compass', 'cmq', 'cssmin', 'clean'],
options: { livereload: true }
}
},
concat: {
debug: {
src: ['js/src/**/*.js'],
dest: 'js/tmp/debug.js'
}
},
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-combine-media-queries');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'compass', 'cmq', 'cssmin', 'clean']);
}