Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Can't get it to work in an ionic project - possibly typescript related? #240

Closed
rbt074 opened this issue Oct 24, 2018 · 1 comment
Closed
Assignees
Labels
api: vision Issues related to the googleapis/nodejs-vision API. 🚨 This issue needs some love. triage me I really want to be triaged. web

Comments

@rbt074
Copy link

rbt074 commented Oct 24, 2018

Hi,

I am trying to test this in a simple ionic project, but as soon as I include in a project it fails with:

TypeError: Cannot read property 'prototype' of undefined
at patch (http://localhost:8100/build/vendor.js:230900:54)
at Object. (http://localhost:8100/build/vendor.js:230761:18)
at Object. (http://localhost:8100/build/vendor.js:230998:30)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object. (http://localhost:8100/build/vendor.js:230701:10)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.module.exports (http://localhost:8100/build/vendor.js:230633:18)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.module.exports (http://localhost:8100/build/vendor.js:148017:17)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)

Environment details

  • Windows 10
  • Node.js version: 9.3.0
  • npm version: 5.6.0
  • @google-cloud/vision version: v0.22.1

Steps to reproduce

0 . install ionic/cordova: $ npm install -g ionic cordova

  1. ionic start (just generate a simple tab project)
  2. add to page home.ts above @component decorator: (probably better to make a provider instead but it failes never the less)

// Imports the Google Cloud client library
import vision from '@google-cloud/vision'; // or require depending on typescript version
const client = new vision.ImageAnnotatorClient();

  1. ionic serve

I am not an expert in any way but this gets me stuck wanting to try it out with using HTTP calls myself as I have seen others doing in ionic projects.

Thanks!

Robert

@JustinBeckwith
Copy link
Contributor

Greetings! The library doesn't currently support webpack :/ We are tracking this over in #216

@google-cloud-label-sync google-cloud-label-sync bot added the api: vision Issues related to the googleapis/nodejs-vision API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
@JustinBeckwith JustinBeckwith self-assigned this Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: vision Issues related to the googleapis/nodejs-vision API. 🚨 This issue needs some love. triage me I really want to be triaged. web
Projects
None yet
Development

No branches or pull requests

3 participants