genkit
genkit copied to clipboard
Improve error messages when PROJECT ID is missing
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/[email protected][email protected]/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/[email protected][email protected]/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
google-auth-library is owned by OAuth team, not something Firebase manages, maybe better file the request with them?
@apascal07 status? Close if no longer applicable.