Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript - init VertexAI TypeError: VertexAI is not a constructor #3859

Open
simondpalmer opened this issue Sep 16, 2024 · 0 comments
Open
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@simondpalmer
Copy link

simondpalmer commented Sep 16, 2024

Describe the issue

import { VertexAI } from "@google-cloud/vertexai";
const vertexAI = new VertexAI({project: project, location: location});

Created this as per the Vertex AI SDK but inside a .tsx file instead of a .js file. Error is as follows:
TypeError: google_cloud_vertexai__WEBPACK_IMPORTED_MODULE_3_.VertexAI is not a constructor

Could you provide support for Typescript use?

@simondpalmer simondpalmer added priority: p2 Moderately-important priority. Fix may not be included in next release. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 16, 2024
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant