I can also confirm this issue.
This is also reproducible locally.
1. Have a python environment where only prefect is installed
2. Have a flow which needs an external dependency which is not installed with prefect (let's say sengrid)
3. Run prefect build and apply --> One of the commands fails with "sendgrid not available".
(It's clear that you can't run this flow, as the dependency is missing. However I guess build or applying should be possible without any dependencies other than prefect?)
I worked around this issue by using my prefect agent docker image as build agent - but this seems like quite a hack 😄
Count me in if we don't need all the dependencies of a flow during build time in the future!