Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot delete files outside the current working directory Grunt

Tags:

gruntjs

I am using grunt to build my angular project. So it worked well, but at some point I cannot run 'grunt serve' or 'grunt build' anymore. Every time I get the following error message

Cannot delete files outside the current working directory

The strange thing is, that I am the only one, who gets this error. All of my colleagues can build or serve without any error. Of course I found a solution for that (using '--force'), but I think this cannot be the solution as I am the only one who got this error. Can anyone please explain that error to me and maybe give be a better solution that the force-option!

// Empties folders to start fresh
    clean: {
      dist: {
        files: [{
          dot: true,
          src: [
            '.tmp',
            '<%= yeoman.dist %>/{,*/}*',
            '!<%= yeoman.dist %>/.git{,*/}*'
          ]
        }]
      },
      server: '.tmp'
    }, 
like image 534
threxx Avatar asked Sep 05 '25 03:09

threxx


1 Answers

For the curious, this is probably caused by

https://github.com/gruntjs/grunt/issues/1469

The issue is new with node 5.7, which I'm betting @threxx is using while her co-workers are still on 5.6 or earlier.

Until the PR for the issue is merged the force flag is a great work around.

like image 191
peterc Avatar answered Sep 07 '25 22:09

peterc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!