Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.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
Angular 乙烯基ftp:使用conn.clean()时没有此类文件或目录_Angular_Gulp_Vinyl Ftp - Fatal编程技术网

Angular 乙烯基ftp:使用conn.clean()时没有此类文件或目录

Angular 乙烯基ftp:使用conn.clean()时没有此类文件或目录,angular,gulp,vinyl-ftp,Angular,Gulp,Vinyl Ftp,我正在使用将Angular应用程序部署到我的FTP服务器 我使用以下吞咽任务: gulp.task('deploy:dev', function () { const connection = ftp.create({ host: 'host.com', user: 'user', password: 'pw', log: gutil.log, parallel: 1, reload: true }); const remotePat

我正在使用将Angular应用程序部署到我的FTP服务器

我使用以下吞咽任务:

gulp.task('deploy:dev', function () {
  const connection = ftp.create({
    host: 'host.com',
    user: 'user',
    password: 'pw',
    log: gutil.log,
    parallel: 1,
    reload: true
  });

  const remotePath = '/remote';

  return gulp.src(['dist/**', '!dist/.htaccess'], { buffer: false })
    .pipe(connection.newer(remotePath))
    .pipe(connection.dest(remotePath))
    .pipe(connection.clean(remotePath + '/**', 'dist/**'));
});
我在使用时遇到以下错误:

[08:54:03]正在启动“部署:开发”。。。
康涅狄格州
[08:54:03]准备好了吗
[08:54:03]MLSD/远程
[08:54:04]MLSD/
[08:54:04]列表/远程
[08:54:04]列表/
[08:54:04]MLSD/远程/资产
[08:54:04]DEL\remote\3rdpartylices.txt
[08:54:04]列表/远程/资产
[08:54:04]“部署:开发”在864毫秒后出错
[08:54:04]错误:\remote\3rdpartylicenses.txt:没有这样的文件或目录
在生成错误时(C:\Users\volkende\WebstormProjects\project\node\u modules\ftp\lib\connection.js:1067:13)
在解析器处。(C:\Users\volkende\webstoreprojects\project\node\u modules\ftp\lib\connection.js:113:25)
两点钟(events.js:106:13)
在Parser.emit(events.js:191:7)
在解析器处写入(C:\Users\volkende\webstoreprojects\project\node\u modules\ftp\lib\Parser.js:59:10)
在doWrite(_stream_writable.js:331:12)
在writeOrBuffer(_stream_writeable.js:317:5)
在Parser.Writable.write(_stream_Writable.js:243:11)
位于Socket.ondata(C:\Users\volkende\webstorprojects\project\node\u modules\ftp\lib\connection.js:273:20)
在emitOne(events.js:96:13)
信息和问题

  • 所有文件都会出现相同的错误,不仅是
    3rdpartylices.txt
    (也适用于包含哈希的文件,如
    inline.da6sadja7sdj9.bundle.js

  • 我注意到了
    /
    \
    之间的切换。我目前正在使用Windows计算机,FTP服务器使用
    /

  • 为什么
    conn.clean()
    抛出这样一个错误,因为当我手动检查远程位置时,文件就在那里


这里有同样的问题……这里也有同样的问题。。。
[08:54:03] Starting 'deploy:dev'...
[08:54:03] CONN
[08:54:03] READY
[08:54:03] MLSD  /remote
[08:54:04] MLSD  /
[08:54:04] LIST  /remote
[08:54:04] LIST  /
[08:54:04] MLSD  /remote/assets
[08:54:04] DEL   \remote\3rdpartylicenses.txt
[08:54:04] LIST  /remote/assets
[08:54:04] 'deploy:dev' errored after 864 ms
[08:54:04] Error: \remote\3rdpartylicenses.txt: No such file or directory
    at makeError (C:\Users\volkende\WebstormProjects\project\node_modules\ftp\lib\connection.js:1067:13)
    at Parser.<anonymous> (C:\Users\volkende\WebstormProjects\project\node_modules\ftp\lib\connection.js:113:25)
    at emitTwo (events.js:106:13)
    at Parser.emit (events.js:191:7)
    at Parser._write (C:\Users\volkende\WebstormProjects\project\node_modules\ftp\lib\parser.js:59:10)
    at doWrite (_stream_writable.js:331:12)
    at writeOrBuffer (_stream_writable.js:317:5)
    at Parser.Writable.write (_stream_writable.js:243:11)
    at Socket.ondata (C:\Users\volkende\WebstormProjects\project\node_modules\ftp\lib\connection.js:273:20)
    at emitOne (events.js:96:13)