react-audioplayer
react-audioplayer copied to clipboard
TypeError: Cannot read property 'addEventListener' of null
n.value node_modules/react-audioplayer/build/react-audioplayer.js:1
TypeError: Cannot read property 'addEventListener' of null TypeError: Cannot read property 'removeEventListener' of null
two errors when trying to load component inside render.
<Audio width={600} height={400} autoPlay={true} fullPlayer={true} playlist={p} style={{ paddingTop: 5 }} onCommentSubmit={text => { console.log(text); }} />
const p is an array with song objects.
Same issue here, did you find a solution?
+1
I downgraded to version 0.2.3 and that solved it.
same here.... to say that I see this exploding bug.
@xmeltrut This might resolve the issue, I haven't tested but it introduces 355 vulnerabilities from what NPM is screaming about.
trying this npm install [email protected] --save npm audit fix
No this still exploded...
The stacktrace is so large I am lost as to what really broke this. Either it's really small or really large this bug..
either way , I am not sure if I should risk such a potential explosion.
Actually, I found out that the issue is somewhere in the comments module. So i removed the call to render the comments from the overall player and I think that solved it. Don't remember what else I did, but it's really a pain so I might still be changing to something else soon.
I downgraded to version 0.2.3 but still the same , also tried removing comments module , no use. Same error continues.
Looking for a solution. Thanks in advance.
Still getting this error. Makes this unusable.
moving back to 0.2.3 fixed the problem
I was able to solve my issue by switching from npm install to yarn install. Apparently, the project was set up using yarn originally and I just joined and was used to npm. Not sure why that fixed it but it did.