[英]Gulp Rename illegal operation
My gulp file looks like: 我的gulp文件看起来像:
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' [11:59:18]错误:EISDIR:对目录进行非法操作,打开'... 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. 基本上,我有一个aurelia.login.json
目录,我想复制并重命名为同一目录中的aurelia.json
。
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
这里的问题是因为在以前的测试中我不小心在我试图创建文件aurelia.json
的目录中创建了一个名为aurelia.json
的目录。
After deleting that directory it then worked perfectly. 删除该目录后,它完美地工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.