It's required to build packages in Git repositories. The build command looks for the .git reference in parent directories to find the root and place the build directory there.
Unfortunately the error isn't clear and seems like this:
Error: building package failed: locating build directory for package failed: creating new build directory failed: locating place for build directory failed
The goal of this issue is to improve the developer experience and describe the behavior in command's doc.