genkit icon indicating copy to clipboard operation
genkit copied to clipboard

Improve error messages when PROJECT ID is missing

Open peterfriese opened this issue 1 year ago • 1 comments

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

peterfriese avatar May 12 '24 20:05 peterfriese

google-auth-library is owned by OAuth team, not something Firebase manages, maybe better file the request with them?

avolkovi avatar Jul 08 '24 16:07 avolkovi

@apascal07 status? Close if no longer applicable.

chrisraygill avatar Dec 09 '24 17:12 chrisraygill