This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
helpers.js?cd8a:247 Uncaught TypeError: gax.GoogleProtoFilesRoot is not a constructor #431
Labels
api: vision
Issues related to the googleapis/nodejs-vision API.
needs more info
This issue needs more information from the customer to proceed.
type: question
Request for information or clarification. Not an issue.
web
I try to implement Google Vision Api in Vuejs but I getting this error:
helpers.js?cd8a:247 Uncaught TypeError: gax.GoogleProtoFilesRoot is not a constructor
this code is in my ocr.vue file
<script>
export default {
name: "ocr"
};
// Imports the Google Cloud client library
const vision = require("@google-cloud/vision");
// Creates a client
const client = new vision.ImageAnnotatorClient();
// Performs label detection on the image file
client
.textDetection('./resources/maybank2u.png')
.then(result => {
const labels = result[0].textAnnotations;
console.log("Text:");
labels.forEach(text => console.log(text));
})
.catch(err => {
console.error("ERROR:", err);
});
</script>
Any idea how to solve this?
The text was updated successfully, but these errors were encountered: