` component which emits startGame_\r\n\r\nHere is the code:\r\n```\r\n\u003Ctemplate>\r\n \u003CModal @startGame=\"startGame\" />\r\n\u003C/template>\r\n\r\n\u003Cscript>\r\nimport { useSound } from '@vueuse/sound'\r\nimport bgAudio from '@/assets/audio/stranger-things.mp3'\r\n\r\nexport default {\r\n setup() {\r\n const { play } = useSound(bgAudio)\r\n\r\n const startGame = () => {\r\n /* other codes here */\r\n play()\r\n }\r\n return {\r\n startGame\r\n }\r\n }\r\n}\r\n\u003C/script>\r\n```\r\n",[],"sound","TypeError: Cannot read properties of undefined (reading 'version')","2022-11-25T02:10:33Z","https://github.com/vueuse/sound/issues/17",0.69938177,{"description":3157,"labels":3158,"number":3159,"owner":3141,"repository":3142,"state":3143,"title":3160,"updated_at":3161,"url":3162,"score":3163},"Hello, I'm trying to create a Vite Library with Vue-Demi to work in Nuxt 2 and Nuxt 3.\r\n\r\nI guess I'm missing something. I've seen a lot of examples but I don't know what I'm doing wrong.\r\n\r\n[Here is the repo with the examples and errors.](https://github.com/priverop/vue-demi-vite-with-nuxt)\r\n\r\nAfter running `yarn install && yarn dev` in both the **lib-consumer** projects it works fine in Nuxt 2 but it doesn't work in Nuxt 3.\r\n\r\nnuxt.config.ts\r\n```typescript\r\nexport default defineNuxtConfig({\r\n build: {\r\n transpile: ['@prp-astara/vite-test-lib'],\r\n },\r\n})\r\n```\r\n\r\n```bash\r\n[Vue warn]: Property \"_self\" was accessed during render but is not defined on instance. 13:18:50\r\n[Vue warn]: Unhandled error during execution of render function 13:18:50\r\n at \u003CAnonymous>\r\n[nitro] [dev] [unhandledRejection] TypeError: Cannot read properties of undefined (reading '_c') 13:18:50\r\n at Proxy.$ (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@prp-astara/vite-test-lib/dist/vite-test-lib.umd.js:1:1163)\r\n at renderComponentRoot (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:906:44) 13:18:41\r\n at renderComponentSubTree (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:719:51)\r\n at renderComponentVNode (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:644:16)\r\n at Module.ssrRenderComponent (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:94:12)\r\n at _sfc_ssrRender (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/app.vue:23:31)\r\n at renderComponentSubTree (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:710:17)\r\n at renderComponentVNode (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:644:16)\r\n at Module.ssrRenderComponent (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:94:12)\r\n at default (/vue-demi-vite-with-nuxt/nuxt3-lib-consumer/node_modules/nuxt/dist/app/components/nuxt-root.vue:63:37)\r\n```\r\n\r\nThis is the exact issue I had when you try to get Vue 2 working in Nuxt 3.\r\n\r\nThank you",[],212,"Can't get it working with Vite in Nuxt 3","2023-02-08T16:29:10Z","https://github.com/vueuse/vue-demi/issues/212",0.7039606,{"description":3165,"labels":3166,"number":3167,"owner":3141,"repository":3141,"state":3168,"title":3169,"updated_at":3170,"url":3171,"score":3172},"### Describe the bug\r\n\r\nnode_modules/.pnpm/@vueuse+shared@9.2.0_vue@3.2.39/node_modules/@vueuse/shared/index.d.ts:770:20 - error TS2694: Namespace 'Intl' has no exported member 'LocalesArgument'.\r\n\r\n@vueuse/shared@9.2.0\r\ntypescript@4.8.3\r\n\r\n### Reproduction\r\n\r\nvue-tsc --declaration --emitDeclarationOnly\r\n\r\n### System Info\r\n\r\n```Shell\r\nmacOS\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\npnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],2230,"closed","vue-tsc build error","2022-11-26T08:56:49Z","https://github.com/vueuse/vueuse/issues/2230",0.68117094,{"description":3174,"labels":3175,"number":3176,"owner":3141,"repository":3141,"state":3168,"title":3177,"updated_at":3178,"url":3179,"score":3180},"### Describe the bug\r\n\r\nIt seems when in vue3 project, it still import vue-demi.\r\n\r\nWhen i down to 8.9.3, problem solved.\r\n\r\n```\r\n10:14:49 AM [vite] Internal server error: Failed to resolve import \"vue-demi\" from \"node_modules/.vite/deps/chunk-KBM4AKY4.js?v=49be3b31\". Does the file exist?\r\n Plugin: vite:import-analysis\r\n File: /Users/alex.xie/code/divzen-web/node_modules/.vite/deps/chunk-KBM4AKY4.js?v=49be3b31\r\n 1 | // node_modules/.pnpm/@vueuse+shared@8.9.4_vue@3.2.37/node_modules/@vueuse/shared/index.mjs\r\n 2 | import { shallowRef, watchEffect, readonly, ref, unref, isVue3, watch, customRef, effectScope, provide, inject, getCurrentScope, onScopeDispose, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from \"vue-demi\";\r\n | ^\r\n 3 | var __defProp$9 = Object.defineProperty;\r\n 4 | var __defProps$6 = Object.defineProperties;\r\n```\r\n\r\n### Reproduction\r\n\r\ni may put it later\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: macOS 12.4\r\n CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz\r\n Memory: 499.36 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.17 - ~/.yarn/bin/yarn\r\n npm: 8.5.5 - ~/.config/yarn/global/node_modules/.bin/npm\r\n Browsers:\r\n Chrome: 103.0.5060.114\r\n Firefox: 89.0\r\n Safari: 15.5\r\n npmPackages:\r\n @vueuse/core: 8.9.4 => 8.9.4 \r\n vue: ^3.2.37 => 3.2.37\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\npnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],1953,"v8.9.4 will break vue3 project?","2022-07-19T05:57:43Z","https://github.com/vueuse/vueuse/issues/1953",0.68907505,{"description":3182,"labels":3183,"number":3184,"owner":3141,"repository":3141,"state":3168,"title":3185,"updated_at":3186,"url":3187,"score":3188},"### Describe the bug\r\n\r\nWhen using `useFocusWithin`, it will not take into account whether the document has focus or not, unlike :focus-within it tries to emulate.\r\n\r\nThis can be observed on vueuse's website; focusing an input on the demo page and moving focus out of the browser will cause the style to change, but the form will still be considered focused by vueuse.\r\n\r\n### Reproduction\r\n\r\nhttps://vueuse.org/core/useFocusWithin/\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 6.9 Arch Linux\r\n CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz\r\n Memory: 2.20 GB / 15.58 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 22.1.0 - ~/.nvm/versions/node/v22.1.0/bin/node\r\n Yarn: 1.22.22 - /bin/yarn\r\n npm: 10.7.0 - ~/.nvm/versions/node/v22.1.0/bin/npm\r\n pnpm: 9.4.0 - ~/files/projects/radix-vue/radix-vue/node_modules/.bin/pnpm\r\n bun: 1.1.10 - /bin/bun\r\n Browsers:\r\n Chromium: 125.0.6422.112\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\npnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],4083,"useFocusWithin doesn't respond to document.hasFocus()","2024-12-19T03:23:00Z","https://github.com/vueuse/vueuse/issues/4083",0.6895187,{"description":3190,"labels":3191,"number":3192,"owner":3141,"repository":3141,"state":3168,"title":3193,"updated_at":3194,"url":3195,"score":3196},"### Describe the bug\n\n在正常的页面跳转中没有问题,但是一旦刷新页面就会报错,重复刷新两三次又能恢复正常一次\n\n### Reproduction\n\n无\n\n### System Info\n\n```Shell\n[Vue warn]: A plugin must either be a function or an object with an \"install\" function.\r\n[Vue Router warn]: uncaught error during route navigation:\r\nError [ERR_MODULE_NOT_FOUND]: Cannot find package 'vue-demi' imported from /root/mqingmo/server/node_modules/@vueuse/integrations/useQRCode.mjs\r\n at new NodeError (node:internal/errors:387:5)\r\n at packageResolve (node:internal/modules/esm/resolve:852:9)\r\n at moduleResolve (node:internal/modules/esm/resolve:901:20)\r\n at defaultResolve (node:internal/modules/esm/resolve:1115:11)\r\n at nextResolve (node:internal/modules/esm/loader:163:28)\r\n at ESMLoader.resolve (node:internal/modules/esm/loader:837:30)\r\n at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)\r\n at ModuleWrap.\u003Canonymous> (node:internal/modules/esm/module_job:76:40)\r\n at link (node:internal/modules/esm/module_job:75:36) {\r\n code: 'ERR_MODULE_NOT_FOUND'\r\n}\r\n```\n```\n\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3018,"nuxt3二维码在服务器上刷新页面异常","2023-06-23T10:19:09Z","https://github.com/vueuse/vueuse/issues/3018",0.6915053,{"description":3198,"labels":3199,"number":3200,"owner":3141,"repository":3142,"state":3168,"title":3201,"updated_at":3202,"url":3203,"score":3204},"I build a component repo with vue.2.7 and vue-demi.0.13.11. The dist artifact is wired with a NPE.\r\n\u003Cimg width=\"653\" alt=\"lQLPJxBSESCyRRxozQUZsK_10SXmQKrdA-fd554A-QA_1305_104\" src=\"https://user-images.githubusercontent.com/37140132/219293117-da007645-709b-4dcb-9fd3-7af46057d07c.png\">\r\nIt crushes the building process in my vue.3.0 project. Maybe an issue caused by #192 ?",[],214,"Vue.utils.warn break build process.","2023-03-28T13:17:04Z","https://github.com/vueuse/vue-demi/issues/214",0.69154316,{"description":3206,"labels":3207,"number":3208,"owner":3141,"repository":3141,"state":3168,"title":3209,"updated_at":3210,"url":3211,"score":3212},"### Describe the bug\r\n\r\nIn our CI environment the following error occurs during `vite build`:\r\n\r\n```txt\r\n\"Fragment\" is not exported by \"node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs\", imported by \"node_modules/@vueuse/core/index.mjs\".\r\nfile: /builds/.../node_modules/@vueuse/core/index.mjs:3:135\r\n1: import { noop, makeDestructurable, toValue, isClient, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, isObject, objectOmit, promiseT...\r\n2: export * from '@vueuse/shared';\r\n3: import { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, ...\r\n ^\r\n4: \r\n5: function computedAsync(evaluationCallback, initialState, optionsOrRef) {\r\nerror during build:\r\nRollupError: \"Fragment\" is not exported by \"node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs\", imported by \"node_modules/@vueuse/core/index.mjs\".\r\n```\r\n\r\nWhat seems odd to me is that the error message says it could not import from `vue-demi/lib/index.mjs`, but actually it should import from `vue-demi/lib/v2.7/index.mjs`.\r\n\r\n### Reproduction\r\n\r\n\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)\r\n CPU: (1) x64 Intel(R) Xeon(R) CPU @ 2.30GHz\r\n Memory: 2.85 GB / 3.60 GB\r\n Container: Yes\r\n Shell: 5.1.4 - /bin/bash\r\n Binaries:\r\n Node: 18.16.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.5.1 - /usr/local/bin/npm\r\n npmPackages:\r\n @vueuse/core: 10.0.2 => 10.0.2 \r\n vue: 2.7.14 => 2.7.14\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\nnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3009,"RollupError: \"Fragment\" is not exported when updating to @vueuse/core 10.x","2023-05-03T09:38:53Z","https://github.com/vueuse/vueuse/issues/3009",0.69481164,{"description":3214,"labels":3215,"number":3218,"owner":3141,"repository":3141,"state":3168,"title":3219,"updated_at":3220,"url":3221,"score":3222},"When using it in yarn workspaces / lerna environment, the library throws an error with the following structure\r\n- testproject\r\n- - node_modules\r\n- - - @vueuse\r\n- - - vue-demi\r\n- - packages\r\n- - - my-module\r\n- - - - node_modules\r\n- - - - index.ts with import vueuse from '@vueuse/core'\r\n\r\n\r\n\r\n```\r\nWARNING Compiled with 1 warnings 7:45:35 PM\r\n\r\n warning in /Users/chetzof/Work/testproject/node_modules/@vueuse/core/dist/index.esm.js\r\n\r\n\"export 'createApp' was not found in 'vue-demi'\r\n\r\nModuleDependencyWarning: \"export 'createApp' was not found in 'vue-demi'\r\n at Compilation.reportDependencyErrorsAndWarnings (/Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1459:23)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1258:10\r\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/chetzof/Work/testproject/node_modules/tapable/lib/HookCodeFactory.js:33:10), \u003Canonymous>:18:1)\r\n at AsyncSeriesHook.lazyCompileHook (/Users/chetzof/Work/testproject/node_modules/tapable/lib/Hook.js:154:20)\r\n at Compilation.finish (/Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1253:28)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compiler.js:672:17\r\n at eval (eval at create (/Users/chetzof/Work/testproject/node_modules/tapable/lib/HookCodeFactory.js:33:10), \u003Canonymous>:9:1)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1185:12\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1097:9\r\n at processTicksAndRejections (internal/process/task_queues.js:79:11)\r\n at HarmonyImportSpecifierDependency._getErrors (/Users/chetzof/Work/testproject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11)\r\n at HarmonyImportSpecifierDependency.getWarnings (/Users/chetzof/Work/testproject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15)\r\n at Compilation.reportDependencyErrorsAndWarnings (/Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1454:24)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1258:10\r\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/chetzof/Work/testproject/node_modules/tapable/lib/HookCodeFactory.js:33:10), \u003Canonymous>:18:1)\r\n at AsyncSeriesHook.lazyCompileHook (/Users/chetzof/Work/testproject/node_modules/tapable/lib/Hook.js:154:20)\r\n at Compilation.finish (/Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1253:28)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compiler.js:672:17\r\n at eval (eval at create (/Users/chetzof/Work/testproject/node_modules/tapable/lib/HookCodeFactory.js:33:10), \u003Canonymous>:9:1)\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1185:12\r\n at /Users/chetzof/Work/testproject/node_modules/webpack/lib/Compilation.js:1097:9\r\n at processTicksAndRejections (internal/process/task_queues.js:79:11)\r\n```\r\n\r\nafter i copy `testproject/node_modules/@vueuse` to `testproject/packages/my-module/node_modules` the error goes away",[3216],{"name":3138,"color":3217},"f2f08a",259,"The library does not work properly in a monorepo configuration","2021-10-28T06:46:30Z","https://github.com/vueuse/vueuse/issues/259",0.6964697,["Reactive",3224],{},["Set"],["ShallowReactive",3227],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fW5AKkQVd5zb1YYHw9U7rLZJXtlNLgA-1m1wO5lYE_28":-1},"/vueuse/vue-demi/235"]