Skip to content

EventEmitter doesn't seem to work in iOS #32189

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

Closed
camdagr8 opened this issue Sep 12, 2021 · 3 comments
Closed

EventEmitter doesn't seem to work in iOS #32189

camdagr8 opened this issue Sep 12, 2021 · 3 comments
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@camdagr8
Copy link

Description

Seems to be an import problem with the EventEmitter. When it's being imported into anything, it doesn't seem to be able to be found. I'm using the parse/react-native module. When it imports the EventEmitter and errors.

See this issue here.

React Native version:

System:
    OS: macOS 11.5.2
    CPU: (8) x64 Apple M1
    Memory: 19.45 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 7.23.0 - ~/../node_modules/.bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2
    react-native: 0.65.1 => 0.65.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Create a blank RN project
  2. Add the Parse SDK: npm install --save parse
  3. Try to import Parse: `import Parse from 'parse/react-native;'
  4. Cry 😭

Expected Results

I expect there to be no errors and for my code to compile.

Snack, code example, screenshot, or link to a repository:

/.../node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:15
import type {EventSubscription} from './EventSubscription';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/.../node_modules/parse/lib/react-native/EventEmitter.js:8:20)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
TypeError: Super expression must either be null or a function
    at _inherits (/.../node_modules/parse/node_modules/@babel/runtime/helpers/inherits.js:5:11)
    at /.../node_modules/parse/lib/react-native/LiveQuerySubscription.js:56:26
    at Object.<anonymous> (/.../node_modules/parse/lib/react-native/LiveQuerySubscription.js:89:2)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/.../node_modules/parse/lib/react-native/LiveQueryClient.js:24:53)
@camdagr8
Copy link
Author

I've tried quite a few things and still can't seem to get a work-around for this.

@stale
Copy link

stale bot commented Jan 9, 2022

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 9, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

1 participant