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.98k stars 1.13k forks source link

Uncaught TypeError: (0 , _memoizeOne.default) is not a function #1194

Closed Shing-Ho closed 1 month ago

Shing-Ho commented 3 years ago

Be sure to search for your issue before opening a new one.

Current Behavior

It's suddenly happened today. Suddenly it's showing Uncaught TypeError: (0 , _memoizeOne.default) is not a function image

Expected Behavior

It shoudn't show

Steps to Reproduce

1.import ReactPlayer from 'react-player'; 2.

Environment

Other Information

Yasamato commented 3 years ago

I would expect your node modules to not be correctly installed or not of the correct version, as I cannot replicate your issue at all in a fresh ts project.

rememberlenny commented 3 years ago

I am getting this error too. I would love to help debug this if anyone has any thoughts.

TheAsda commented 3 years ago

I'm facing the same issue with vite

Yasamato commented 3 years ago

Just a question, are you guys using vanilla JS or TypeScript? Cannot reproduce on TS at least

TheAsda commented 3 years ago

I'm using typescript with vite and react 17

rememberlenny commented 3 years ago

I was also using VITEjs. I had to copy the node module and use the source files as a vendor folder to get it working.

The issue seems to be related to how the npm module is compiled.

bilalesi commented 2 years ago

any solution for this bug, i am using vite and react 17

rememberlenny commented 2 years ago

It’s an issue with compiling the react lazy imports.

I imported the npm module code into our code base as a vendor folder and it worked fine.

bilalesi commented 2 years ago

@rememberlenny so how we can add it to the project without facing the bug, can you please describe the steps to added it ??! thank you

porkytheblack commented 1 year ago

restarting the server worked for me