The following tasks did not complete: first Did you forget to signal async completion?

简介: The following tasks did not complete: first Did you forget to signal async completion?

The following tasks did not complete: first Did you forget to signal async completion?

在使用gulp执行task的时候,使用匿名函数经常出现以下错误:

两种解决办法

方法一:这个是最简单的一种方法使用done来进行回调,gulp会自动将这个回调函数作为一个参数返回到任务中,在完成的时候一定要调用这个函数。如下:

方法二 :在异步请求机制中,是有一个Promise对象的,它包含了请求的过程中所有内容。如下:


相关文章
已解决 RuntimeError: There is no current event loop in thread ‘Thread-1‘.
Jetson Xavier NX 报错 RuntimeError: There is no current event loop in thread 'Thread-1'.异常错误,已解决
519 0
已解决 RuntimeError: There is no current event loop in thread ‘Thread-1‘.
ResizeObserver loop completed with undelivered notifications
ResizeObserver loop completed with undelivered notifications
|
5月前
|
Python
【ERROR】asyncio.run(main())报错:RuntimeError: Event loop is closed
【ERROR】asyncio.run(main())报错:RuntimeError: Event loop is closed
118 0
|
6月前
【Bug】ERROR ResizeObserver loop completed with undelivered notifications.
【Bug】ERROR ResizeObserver loop completed with undelivered notifications.
|
Java Spring
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
1380 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
414 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
|
Python
may have been in progress in another thread when fork() was called.
may have been in progress in another thread when fork() was called.
140 0
may have been in progress in another thread when fork() was called.
|
Linux
lvm[12446]: Another thread is handling an event. Waiting
在检查一Linux服务器时,发现日志里面有大量“lvm[12446]: Another thread is handling an event. Waiting...” Jul  4 00:01:42 localhost lvm[12446]: Another thread is handling an event.
1033 0