Closed alejandroiglesias closed 11 years ago
EACCES
means node doesn't have permission to read that directory. Probably just need to tighten up your file matching rules to only files you have permission to or run grunt
as a user with adequate permissions.
But /var/agentx
is not a file I manually specified in the Gruntfile nor is it /tmp/launchd-4643.AHyaSD
. Where does those come from?
Could you post your gruntfile?
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
// Task configuration.
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
dist: {
src: ['js/src/**/*.js'],
dest: 'js/build/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
dest: 'js/build/<%= pkg.name %>.min.js'
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
browser: true,
globals: {}
},
gruntfile: {
src: 'Gruntfile.js'
},
lib_test: {
src: ['lib/**/*.js', 'test/**/*.js']
}
},
// qunit: {
// files: ['test/**/*.html']
// },
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib_test: {
files: '<%= jshint.lib_test.src %>',
tasks: ['jshint:lib_test'/*, 'qunit'*/]
},
styles: {
files: '<%= compass.compile.sassDir %>/**/*.scss',
tasks: ['compass:dev']
}
},
compass: {
compile: {
options: {
sassDir: 'scss',
cssDir: 'styles',
specify: ['scss/landing.scss', 'scss/login.scss', 'scss/app.scss'],
imagesDir: 'images',
environment: 'production',
outputStyle: 'compressed',
relativeAssets: true,
force: true
}
},
dev: {
options: {
sassDir: '<%= compass.compile.sassDir %>',
cssDir: '<%= compass.compile.cssDir %>',
specify: '<%= compass.compile.specify %>',
imagesDir: '<%= compass.compile.imagesDir %>',
environment: 'development',
outputStyle: 'compact',
relativeAssets: true,
debugInfo: true,
force: true
}
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
// Default task.
grunt.registerTask('default', ['jshint', /*'qunit',*/ 'concat', 'uglify', 'compass:compile']);
};
Hmm that is strange. Are there any symlink'd directories? It should be bothering with /var/
or /tmp/
.
Nope, running ls -lR /path/to/folder | grep ^l
didn't revealed any.
Ok, just found it commenting around things.
Line
files: '<%= compass.compile.sassDir %>/**/*.scss',
should be:
files: '<%= compass.compile.options.sassDir %>/**/*.scss',
My mistake! But the error message is still strange... Thanks a lot for your help!
Very strange but glad you found the solution!
Check if you're working with a linux filesystem where you can arrange permissions that way (not NTFS for example)
I've been getting strange EACCESS errors when trying to run
grunt watch
.Another example:
Here is a full
grunt watch --verbose
:grunt --version
output:This doesn't happens when running just
grunt
. Any clues about this? This started happening since upgrading to 0.4.