[Support Guide] "Build completed successfully, but the following processes were still running" - how to remove

This post explains the reason why you might see the following warning message in your build logs.

Why this warning message occurs

Netlify builds don’t end until the build command has completed. However, the build command might execute other processes in the background. If the build command completes before those background processes, Netlify terminates the processes to prevent the build from hanging.

This is usually not a problem. However, there are some cases where this termination might be unsafe since it might interrupt some logic.

How to remove the warning message

To fix this, you should make sure the build command waits for its background processes before completing. In JavaScript, this often means properly following and calling promises, async/await, and callbacks.

Sometimes, the problem isn’t coming from the build command itself but from a dependency used by the build command or from a Build Plugin. In that case, you should post an issue on the dependency’s or plugin’s repository.

If you have questions or comments, please ask below.