Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp Rename illegal operation

My gulp file looks like:

function aureliaJsonPath(name) {
    return `./aurelia_project/aurelia.${name}.json`;
}

gulp.task('use-login-au-json', () => {
    return gulp.src(aureliaJsonPath('login'))
        .pipe(rename('aurelia.json'))
        .pipe(gulp.dest('./aurelia_project'));
});

[11:59:18] Error: EISDIR: illegal operation on a directory, open '... base directory...\aurelia_project\aurelia.json'

Basically, I have a directory with aurelia.login.json which I want to copy and rename to aurelia.json in the same directory.

like image 384
Callum Linington Avatar asked Jan 06 '23 01:01

Callum Linington


1 Answers

The problem here was because in previous tests I had accidentally created a directory called aurelia.json inside the directory I was trying to create the file aurelia.json

After deleting that directory it then worked perfectly.

like image 103
Callum Linington Avatar answered Jan 13 '23 09:01

Callum Linington