PacktPublishing / Real-world-Projects-with-Vue.js

Real world Projects with Vue.js [video], published by Packt
MIT License
23 stars 18 forks source link

Music Library Search not working #1

Open leobewater opened 5 years ago

leobewater commented 5 years ago

Hi,

The last exercise of the music library with the search component doesn't work and I couldn't figure it out. Please help. Here are the error messages ` music.worker.js?4fe3:5 Uncaught TypeError: Cannot read property 'filter' of undefined at eval (music.worker.js?4fe3:5) (anonymous) @ music.worker.js?4fe3:5 postMessage (async) sendMsg @ index.js?bed3:67 ok @ index.js?bed3:136 onmessage @ socket.js?57b2:41 EventTarget.dispatchEvent @ sockjs.js?3600:170 (anonymous) @ sockjs.js?3600:887 SockJS._transportMessage @ sockjs.js?3600:885 EventEmitter.emit @ sockjs.js?3600:86 WebSocketTransport.ws.onmessage @ sockjs.js?3600:2961 music.worker.js?4fe3:5 Uncaught TypeError: Cannot read property 'filter' of undefined at eval (music.worker.js?4fe3:5) (anonymous) @ music.worker.js?4fe3:5 postMessage (async) setTimeout @ VM5111:1 setTimeout (async) (anonymous) @ VM5111:1 (anonymous) @ VM5111:1 i @ detector.js:1 180 @ detector.js:1 n @ detector.js:1 (anonymous) @ detector.js:1 (anonymous) @ detector.js:1 vue.esm.js?efeb:610 [Vue warn]: Error in callback for watcher "searchInput": "TypeError: __WEBPACK_IMPORTED_MODULE_0musicworkerdefault.a is not a constructor"

found in

---> at src/components/MusicSearch.vue

at src/components/MusicIndex.vue at src/App.vue `
DKhalil commented 5 years ago

Which code are you using there? Your own? The one from the exercise?

safeallahee commented 5 years ago

same problem!

safeallahee commented 5 years ago

Which code are you using there? Your own? The one from the exercise?

Both not working

safeallahee commented 5 years ago

I solved "Uncaught TypeError: Cannot read property 'filter' of undefined" problem with adding if (e.data.songs !== this.undefined) { to worker but second issue still remains