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

Use with React-Native? "Unable to resolve module 'fs' #2664

Closed
acomito opened this issue Oct 10, 2017 · 2 comments
Closed

Use with React-Native? "Unable to resolve module 'fs' #2664

acomito opened this issue Oct 10, 2017 · 2 comments
Assignees
Labels
api: vision Issues related to the Cloud Vision API. core priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. web

Comments

@acomito
Copy link

acomito commented Oct 10, 2017

Environment details

  • OS: mac siera 10.12.6
  • Node.js version: v8.2.1
  • react-native version: Expo v21
  • google-cloud-node version: "@google-cloud/vision": "^0.12.0",

Steps to reproduce

  1. start a new expo project
  2. yarn add @google-cloud/vision
  3. import Vision from "@google-cloud/vision"
  4. start your expo app
  5. red screen of death with "Unable to resolve module 'fs'

Is there anyway for this package to check if it's a react-native environment and disable any node-specific code? For now, I'm moving over to regular old HTTP with axios.

@lukesneeringer
Copy link
Contributor

As you ascertained, we do not currently support browser-side JavaScript. This is probably feasible for some APIs, however, including this one. We will keep it in mind.

@lukesneeringer lukesneeringer added api: vision Issues related to the Cloud Vision API. type: question Request for information or clarification. Not an issue. labels Oct 15, 2017
@stephenplusplus stephenplusplus added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Dec 11, 2017
@stephenplusplus
Copy link
Contributor

Closing in favor of this issue: #531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vision Issues related to the Cloud Vision API. core priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. web
Projects
None yet
Development

No branches or pull requests

4 participants