-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Application Error with Remix v2? #1690
Comments
A colleague has provided me with a workaround:
A bundling problem, perhaps similar to #193 from 2017? I'll leave this issue open as it may connect to something else. |
I'm running into the same issue on Remix 2.1.0 |
Same issue here, I'm working around it by using |
This made it for me, also typescript it's happy about it: import { useState } from 'react'
import ReactPlayer from 'react-player'
import Example_Video from '~/public/media/example-video.mov'
const Player = ReactPlayer.default
export function Video() {
const [hasVideoLoaded, setHasIsVideoLoaded] = useState(false)
return (
<div className={`${hasVideoLoaded ? 'opacity-100' : 'opacity-0'} transition`}>
<Player
url={Example_Video}
playing={true}
muted={true}
playsinline={true}
onReady={() => setHasIsVideoLoaded(true)}
/>
</div>
)
} Thanks to @genmon about the insights on it! |
Same issue here. I tried your fix @dev-xo but there is a type error on the line
|
This issue is still present in Remix 2.4.1. We just switched to ESM module support and that switch demonstrated this issue. Using the above suggestion fixed our issue. |
You saved my day. I was looking for a solution for days!!! EDIT: Well. The solution helped in the first place, but when I refresh the page I get a slightly different error.
|
You can fix this with Client Only from remix-tools.
|
@goldcaddy77 Thx for your comment. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Current Behavior
Using ReactPlayer with Remix v2 out of the box triggers an Application Error:
Expected Behavior
I would expect the player to appear, as it did in Remix v1.
Steps to Reproduce
I have a minimal repro here: remix-v2-reactplayer-minimal
This is the stock Remix v2 starter template
Other Information
I am not experienced with Remix v2 so it is possible I am missing something obvious. Would be grateful if anyone else could let me know whether I'm seeing an incompatibility, or if it's a setup problem.
The text was updated successfully, but these errors were encountered: