I encountered an error while deploying my Golang application using hcp-sdk-go on Vercel Functions. When calling NewHCPConfig, the following error occurred:
failed to retrieve user's home directory path: $home.
After checking the source code, I found that NewHCPConfig (source) calls setTokenSource (source), which in turn calls TokenCacheFile (source), leading to the error (source).