Get `push failed: failed to install dependencies: context deadline exceeded``

I’m using the realm-cli to push changes to my atlas app services app. However, whenever I include dependencies in my deployment using the --include-package-json flag, it often will transpile the dependencies for around 15 minutes before it gives error push failed: failed to install dependencies: context deadline exceeded. It sometimes take me a few attempts before it finally works.

Is there any way I can prevent this error from happening? It appears that changes to most of my app still occur even when there’s an error (for example, the function code is updated), but the dependencies are NOT updated.