cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.89k stars 1.12k forks source link

Everything is fine in development mode. The video is not available after the build. #1738

Closed aon24 closed 3 weeks ago

aon24 commented 3 months ago

Some videos work after the project is built, but this video(relax music) only plays in development mode: https://www.youtube.com/watch?v=Z2msUWb6iX4 I tried react-youtube. The same thing. It plays in development, but not after rebuilding

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-player": "^2.14.1",
"react-scripts": "5.0.1",

Mozilla, GH Linux Mint 21

jonathastavares commented 3 months ago

Exactly the same problem here, getting react minified erro 130 after building.

luwes commented 2 months ago

could you provide a Codesandbox online? this will help with debugging.

saidelimam commented 2 months ago

Same issue for me, I got: Unexpected Application Error! Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

here's my vite config :

{ minify: 'terser', // 'esbuild' by default, 'terser' is slower at build but better compression terserOptions: { compress: { // Terser options for compression drop_console: isProduction && !isPreview, // Remove all console statements (log, time..) drop_debugger: true, // Remove debugger statements passes: 3, // Run the compressor multiple times for better results reduce_funcs: true, // Inline single-use functions reduce_vars: true, // Inline single-use variables }, format: { // Terser options for formatting comments: false, // Remove comments wrap_iife: true, // Wrap immediate function invocations in parentheses }, mangle: { properties: { regex: /^_/, // Example: mangle properties starting with underscores }, }, ecma: 2020, module: true, toplevel: true, safari10: true, } }

luwes commented 3 weeks ago

duplicate of #1746