Skip to content

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

@acomito

Description

@acomito

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.

Metadata

Metadata

Labels

api: visionIssues related to the Cloud Vision API.corepriority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.web

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions