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

Expo and React Native issue with 'events' library #93

Closed
ericcherny opened this issue Dec 31, 2022 · 1 comment
Closed

Expo and React Native issue with 'events' library #93

ericcherny opened this issue Dec 31, 2022 · 1 comment

Comments

@ericcherny
Copy link

Error:

The package at "node_modules/tiktok-live-connector/dist/index.js" attempted to import the Node standard library module "events".
It failed because the native React runtime does not include the Node standard library.

To replicate:

  1. Create Expo project
npx create-expo-app tiktok
  1. Install tiktok-live-connector
npm i tiktok-live-connector
  1. Add first example line
// imports...

const { WebcastPushConnection } = require('tiktok-live-connector');

export default function App() {
  return ...
}
  1. Run Expo app
npx expo start

Attempts to fix:

  • Installing events with npm leads to a domino effect of issues. Next library missing is utils. Next is zlib. Then zlib breaks. Then deleted zlib and tried installing minizlib instead. Minizlib also breaks. Etc.
@zerodytrash
Copy link
Owner

This library only works in NodeJS environments. It is not a library for the client (browser).
The reason for this is that a browser cannot access the TikTok API due to security regulations such as the cross-origin policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants