Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gulp没有创建新目录_Gulp - Fatal编程技术网

Gulp没有创建新目录

Gulp没有创建新目录,gulp,Gulp,我是个新手,我有一个非常基本的问题 我使用下面的代码片段将“html”文件复制到另一个目录 gulp.task('copy-html', (done) => { return gulp.src('./index.html') .pipe(gulp.dest('dist')); }) 然后在命令行中,我编写并执行了gulpcopyhtml 我希望看到一个dist文件夹,里面有index.html 但发生的是什么都不会发生。任务已完成,但未发生任何更改 节点版本:9.

我是个新手,我有一个非常基本的问题

我使用下面的代码片段将“html”文件复制到另一个目录

gulp.task('copy-html', (done) => {
    return gulp.src('./index.html')
        .pipe(gulp.dest('dist'));
})
然后在命令行中,我编写并执行了
gulpcopyhtml

我希望看到一个
dist
文件夹,里面有
index.html

但发生的是什么都不会发生。任务已完成,但未发生任何更改

节点版本:9.3.0
npm版本:5.5.1
一饮而尽的版本:
CLI版本2.0.1
本地版本4.0.0

提前谢谢。

这对我来说很有用。我刚刚将解决方案目录移动到安装操作系统的硬盘分区上,它工作起来很有魅力

不确定,但您能否尝试为您的
gulp.dest()任务添加一个相对路径?像这样
path.join(\uu dirname,'dist')