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

Web: "Requiring unknown module" when calling setupPlayer #2282

Closed
andordavoti opened this issue Mar 28, 2024 · 3 comments
Closed

Web: "Requiring unknown module" when calling setupPlayer #2282

andordavoti opened this issue Mar 28, 2024 · 3 comments
Labels

Comments

@andordavoti
Copy link

Describe the Bug
When TrackPlayer.setupPlayer is called on the web in an Expo project, it returns an error "Requiring unknown module" with some random number. The "shaka-player" package is installed as the docs describe, also tried installing "mux.js", but that shouldn't be needed for my use case, and it doesn't make a difference for this issue either.

Steps To Reproduce
Create a new Expo project with: npx create-expo-app -t expo-template-blank-typescript

Use the same patterns to set up RNTP as the example app.

Code To Reproduce
Create a simple Expo app to reproduce the issue: https://github.com/andordavoti/RNTP-WEB

Replicable on Example App?
The example app is not running Expo and doesn't have this issue.

Environment Info:

react-native-track-player version 4.1.1

System:
OS: macOS 14.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 196.41 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.17.0
path: ~/.nvm/versions/node/v18.17.0/bin/node
Yarn:
version: 1.22.19
path: ~/.yarn/bin/yarn
npm:
version: 9.6.7
path: ~/.nvm/versions/node/v18.17.0/bin/npm
Watchman:
version: 2023.12.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/andordavoti/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK:
API Levels:
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
- "34"
Build Tools:
- 29.0.2
- 29.0.3
- 30.0.2
- 30.0.3
- 31.0.0
- 32.1.0
- 33.0.0
- 33.0.1
- 33.0.2
- 34.0.0
System Images:
- android-28 | ARM 64 v8a
- android-32 | Google APIs ARM 64 v8a
- android-32 | Google Play ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.3
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/andordavoti/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.6
wanted: 0.73.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

How I can Help
Looks like it might be some issue with the inline shaka import in web/TrackPlayer/Player.ts:46

Maybe there is some extra config that's needed for Expo to support this?

@jspizziri
Copy link
Collaborator

@andordavoti I'm sorry you're having this issue. But if you read the documentation and look through past issues you'll see that no formal support is provided for Expo. I recommend the discord community.

@jspizziri jspizziri closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@EssamWisam
Copy link

@jspizziri Could we please update the documentation to reflect this? It says there You can now use React Native Track Player with Expo. and Expo supports Android, iOS and Web but no exceptions are made.

@jspizziri
Copy link
Collaborator

jspizziri commented Apr 29, 2024

@EssamWisam please checkout #2299, I'm hopeful that will fix your issue.

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

No branches or pull requests

3 participants