Improve error messages when PROJECT ID is missing
Open
Nobody has claimed this yet.
feature
- Dominant language
- TypeScript
- Stars
- 6.5k
- Forks
- 845
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 58
Description
When running the Menu sample without a GCP project set up, the error message issued by the Vertex plugin is not intuitive:
Initializing plugin vertexai:
/Users/peterfriese/Workspace/Projects/Incubation/Genkit/genkit/js/node_modules/.pnpm/google-auth-library@9.7.0_encoding@0.1.13/node_modules/google-auth-library/build/src/auth/googleauth.js:147
throw new Error(GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND);
^
Error: Unable to detect a Project Id in the current environment.
To learn more about authentication and Google APIs, visit:
https://cloud.google.com/docs/authentication/getting-started
at GoogleAuth.findAndCacheProjectId (/Users/peterfriese/Workspace/Projects/Incubation/Genkit/genkit/js/node_modules/.pnpm/google-auth-library@9.7.0_encoding@0.1.13/node_modules/google-auth-library/build/src/auth/googleauth.js:147:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.5.1
Error: Code failed to load, please check log messages above.
Can we issue an error message that points the user at setting up a Google Cloud project, and connecting it via gcloud config set project
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.