Error: Invalid dest() folder argument

新手上路,请多包涵

执行 npm run dev:watch的时候报这个错,怎么解决?

(node:17372) UnhandledPromiseRejectionWarning: Error: Invalid dest() folder argument. Please specify a non-empty string or a function.
    at Gulp.dest (C:\Users\72074530\Desktop\runhealth\node_modules\_vinyl-fs@3.0.3@vinyl-fs\lib\dest\index.js:21:11)
    at html (C:\Users\72074530\Desktop\runhealth\gulpfile.dev.js:45:11)
    at FSWatcher.<anonymous> (C:\Users\72074530\Desktop\runhealth\gulpfile.dev.js:137:13)
    at FSWatcher.emit (events.js:315:20)
    at FSWatcher.EventEmitter.emit (domain.js:547:15)
    at FSWatcher.<anonymous> (C:\Users\72074530\Desktop\runhealth\node_modules\_chokidar@2.1.8@chokidar\index.js:200:38)
    at FSWatcher._emit (C:\Users\72074530\Desktop\runhealth\node_modules\_chokidar@2.1.8@chokidar\index.js:241:5)
    at FSWatcher.<anonymous> (C:\Users\72074530\Desktop\runhealth\node_modules\_chokidar@2.1.8@chokidar\lib\nodefs-handler.js:274:18)
    at FSReqCallback.oncomplete (fs.js:176:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17372) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with
.catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17372) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[10:14:45] Starting '<anonymous>'...
[10:14:45] Finished '<anonymous>' after 2.49 ms
阅读 2.7k
1 个回答

这不是写了报错信息吗?

Invalid dest() folder argument

应该是 gulp 构建的代码中 dest函数传参异常。gulp.dest(/ 这里有问题 /)

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题