You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error when trying to use in my Vue3 project. Anybody encountered this before?
TypeError: Cannot read properties of undefined (reading 'version')
at eval (index.mjs?4c81:15)
at Module../node_modules/@vueuse/sound/node_modules/vue-demi/lib/index.mjs (home.js:59)
at webpack_require (app.js:854)
at fn (app.js:151)
at eval (index.js?af75:1)
at Module../node_modules/@vueuse/sound/dist/esm/index.js (home.js:35)
at webpack_require (app.js:854)
at fn (app.js:151)
at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader-v16/dist/index.js?!./src/views/Game.vue?vue&type=script&lang=js:3)
at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader-v16/dist/index.js?!./src/views/Game.vue?vue&type=script&lang=js (home.js:131)
Basically, what I'm trying to achieve is to play the audio when user clicks 'yes' on the <Modal /> component which emits startGame
Here is the code:
<template>
<Modal @startGame="startGame" />
</template>
<script>
import { useSound } from '@vueuse/sound'
import bgAudio from '@/assets/audio/stranger-things.mp3'
export default {
setup() {
const { play } = useSound(bgAudio)
const startGame = () => {
/* other codes here */
play()
}
return {
startGame
}
}
}
</script>
The text was updated successfully, but these errors were encountered:
Having the same issue. I think it is caused by some misconfiguration in vue-demi. I am using Vue ^3.0.0, and having similar error. In Eslint I am getting:
warning in ./node_modules/@vueuse/sound/node_modules/vue-demi/lib/index.mjs
"export 'default' (imported as 'Vue') was not found in 'vue'
warning in ./node_modules/@vueuse/sound/node_modules/vue-demi/lib/index.mjs
"export 'default' (reexported as 'Vue') was not found in 'vue'
I'm getting this error when trying to use in my Vue3 project. Anybody encountered this before?
Basically, what I'm trying to achieve is to play the audio when user clicks 'yes' on the
<Modal />
component which emits startGameHere is the code:
The text was updated successfully, but these errors were encountered: