GoogleCloudPlatform / GoogleCloudPlatform/nodejs-docs-samples
Typescript - init VertexAI TypeError: VertexAI is not a constructor
Open
priority: p2
samples
triage me
type: bug
- Dominant language
- JavaScript
- Stars
- 3k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 44
Description
## 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?
Contributor guide
Assessment
This issue has not been assessed yet.