ring icon indicating copy to clipboard operation
ring copied to clipboard

React App Failed to compile after importing ring-client-api

Open luapp opened this issue 6 years ago • 3 comments

Bug Report

Describe the Bug

React App Failed to compile after importing ring-client-api

To Reproduce

Steps to reproduce the behavior:

  • Create React App with "npx create-react-app my-app"
  • Attempt to import ring-client-api in the default "App.js" file "import { RingApi } from 'ring-client-api'"
  • run the React App "npm install" and "npm start"
  • Then open "localhost:3000" to see the error

Expected behavior

The React App should compile and run normally

Screenshots/Logs

Screenshot of "localhost:3000" of the Failed to compile error: image

Additional context

No Additional context

Environment

  • OS: Windows 10
  • Node.js: v12.16.1
  • NPM: 6.13.4
  • ring-client-api: 9.6.0

luapp avatar Jul 29 '20 18:07 luapp

See #419. Running the client api in a browser is not currently supported. Just like #419, I'm curious what you are trying to accomplish in the browser just for future reference.

dgreif avatar Jul 29 '20 18:07 dgreif

Hi @dgreif Thanks for your fast reply ! Of course ! I'm building a web app with React to monitor my Ring DoorBell and I would like to stream the video and receive the notification from the doorbell inside of my React web app. Because Ring do not have a official API, that is the reason I tried to use this one.

luapp avatar Jul 29 '20 18:07 luapp

Good to know. Unfortunately live streaming in the browser simply will not work with the current SIP setup. I'm investigating another approach, but I'm not sure that it's supported by Ring. For now, the ring-client-api is node only and does not support the browser.

dgreif avatar Jul 30 '20 13:07 dgreif