\r\n \u003C/button>\r\n \u003C/label>\r\n\u003C/template>\r\n```\r\n\r\nBuild output:\r\n```js\r\nimport { defineComponent, ref, openBlock, createElementBlock, createTextVNode, toDisplayString, createElementVNode, mergeProps, renderSlot } from \"vue\";\r\nconst _sfc_main = /* @__PURE__ */ defineComponent({\r\n props: {\r\n label: {\r\n type: String,\r\n default: \"\"\r\n }\r\n },\r\n setup(__props) {\r\n const counter = ref(0);\r\n return (_ctx, _cache) => {\r\n return openBlock(), createElementBlock(\"label\", null, [\r\n createTextVNode(toDisplayString(__props.label) + \" \" + toDisplayString(counter.value) + \" \", 1),\r\n createElementVNode(\"button\", mergeProps(_ctx.$attrs, {\r\n onClick: _cache[0] || (_cache[0] = ($event) => counter.value++)\r\n }), [\r\n renderSlot(_ctx.$slots, \"default\")\r\n ], 16)\r\n ]);\r\n };\r\n }\r\n});\r\nexport { _sfc_main as BaseButton };\r\n```\r\n\r\nIn Vue 2 I run into `Uncaught TypeError: Object(...) is not a function` error with `defineComponent()`. I suppose it should be importing from \"vue-demi\" instead of \"vue\"?\r\n\r\nPackage.json\r\n```json\r\n\"dependencies\": {\r\n \"vue-demi\": \"^0.12.4\"\r\n },\r\n \"devDependencies\": {\r\n \"@types/node\": \"^17.0.21\",\r\n \"@vitejs/plugin-vue\": \"^2.2.0\",\r\n \"@vue/composition-api\": \"^1.4.9\",\r\n \"typescript\": \"^4.5.4\",\r\n \"vite\": \"^2.8.0\",\r\n \"vue\": \"^3.2.25\",\r\n \"vue-tsc\": \"^0.29.8\"\r\n },\r\n \"peerDependencies\": {\r\n \"@vue/composition-api\": \"^1.0.0-rc.1\",\r\n \"vue\": \"^2.0.0 || >=3.0.0\"\r\n },\r\n \"peerDependenciesMeta\": {\r\n \"@vue/composition-api\": {\r\n \"optional\": true\r\n }\r\n },\r\n```\r\n\r\nvite.config.ts\r\n```ts\r\nexport default defineConfig({\r\n plugins: [vue()],\r\n build: {\r\n lib: {\r\n entry: path.resolve(__dirname, \"src/lib.ts\"),\r\n name: \"myLib\",\r\n fileName: (format) => `lib.${format}.js`,\r\n },\r\n rollupOptions: {\r\n // make sure to externalize deps that shouldn't be bundled\r\n // into your library\r\n external: [\"vue\"],\r\n output: {\r\n // Provide global variables to use in the UMD build\r\n // for externalized deps\r\n globals: {\r\n vue: \"Vue\",\r\n },\r\n },\r\n },\r\n },\r\n optimizeDeps: {\r\n exclude: [\"vue-demi\"],\r\n },\r\n});\r\n```",[],145,"Not running on Vue 2 App","2022-09-04T15:48:05Z","https://github.com/vueuse/vue-demi/issues/145",0.71617675,{"description":3175,"labels":3176,"number":3177,"owner":3141,"repository":3141,"state":3152,"title":3178,"updated_at":3179,"url":3180,"score":3181},"i wanna use `@vueuse/core` `useTitle` to change my page title\r\nbut throw error when i only install it..\r\nuse `vueuse 6.0.0` & `vue 3.0.4` & `vite 2.4.4`\r\n```\r\n(this will be run only when your dependencies or config have changed)\r\n > node_modules/@vueuse/shared/index.esm.js:1:64: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"effectScope\"\r\n 1 │ ...puted, unref, watch, ref, customRef, isVue3, isRef, effectScope, onScopeDispose, reactive, toRef, isVue2, toRefs a...\r\n ╵ ~~~~~~~~~~~\r\n\r\n > node_modules/@vueuse/shared/index.esm.js:1:77: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"onScopeDispose\"\r\n 1 │ ...atch, ref, customRef, isVue3, isRef, effectScope, onScopeDispose, reactive, toRef, isVue2, toRefs as toRefs$1, get...\r\n ╵ ~~~~~~~~~~~~~~\r\n\r\n > node_modules/@vueuse/shared/index.esm.js:1:179: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"getCurrentScope\"\r\n 1 │ ... isVue2, toRefs as toRefs$1, getCurrentInstance, onMounted, nextTick, getCurrentScope, onUnmounted } from 'vue-demi';\r\n ╵ ~~~~~~~~~~~~~~~\r\n\r\n > node_modules/@vueuse/core/index.esm.js:1:131: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"getCurrentScope\"\r\n 1 │ ...urrentInstance, onMounted, onUpdated, shallowRef, getCurrentScope, reactive, markRaw, readonly, onBeforeUpdate, is...\r\n ╵ ~~~~~~~~~~~~~~~\r\n\r\nerror when starting dev server:\r\nError: Build failed with 4 errors:\r\nnode_modules/@vueuse/core/index.esm.js:1:131: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"getCurrentScope\"\r\nnode_modules/@vueuse/shared/index.esm.js:1:64: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"effectScope\"\r\nnode_modules/@vueuse/shared/index.esm.js:1:77: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"onScopeDispose\"\r\nnode_modules/@vueuse/shared/index.esm.js:1:179: error: No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"getCurrentScope\"\r\n\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\n*edit: I downgrade vueuse -> `^5.3.0` it works",[],677,"No matching export in \"node_modules/vue-demi/lib/index.mjs\" for import \"effectScope\"","2021-08-27T10:16:56Z","https://github.com/vueuse/vueuse/issues/677",0.7191847,{"description":3183,"labels":3184,"number":3185,"owner":3141,"repository":3141,"state":3152,"title":3186,"updated_at":3187,"url":3188,"score":3189},"I installed VueUse in a Vue 3 project like this:\r\n\r\n`npm install @vueuse/core`\r\n\r\nAnd then I imported it in my component like this:\r\n\r\n````\r\n\u003Cscript setup>\r\n import { useDebounceFn } from '@vueuse/core'\r\n\u003C/script>\r\n````\r\n\r\nAnd now I'm getting this error:\r\n\r\n````\r\nerror in ./node_modules/@vueuse/shared/index.mjs \r\n \r\nexport 'watchSyncEffect' (imported as 'watchSyncEffect') was not found in 'vue-demi' (possible exports: BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, Transition, TransitionGroup, Vue, Vue2, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile, computed, createApp, createBlock, createCommentVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineEmit, defineEmits, defineExpose, defineProps, del, devtools, getCurrentInstance, getTransitionRawChildren, h, handleError, hydrate, initCustomFormatter, inject, install, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, isVue2, isVue3, markRaw, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, set, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useContext, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withModifiers, withScopeId)\r\n````",[],778,"export 'watchSyncEffect' (imported as 'watchSyncEffect') was not found in 'vue-demi'","2021-09-21T19:02:04Z","https://github.com/vueuse/vueuse/issues/778",0.72368056,{"description":3191,"labels":3192,"number":3193,"owner":3141,"repository":3141,"state":3152,"title":3194,"updated_at":3195,"url":3196,"score":3197},"### 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.72520983,{"description":3199,"labels":3200,"number":3201,"owner":3141,"repository":3141,"state":3152,"title":3202,"updated_at":3203,"url":3204,"score":3205},"### 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.72645205,{"description":3207,"labels":3208,"number":3209,"owner":3141,"repository":3142,"state":3152,"title":3210,"updated_at":3211,"url":3212,"score":3213},"\r\nWhen I build with vitepress, get error\r\n\r\n/node_modules/@vueuse/shared/index.mjs:1\r\nimport { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, 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\nSyntaxError: The requested module 'vue-demi' does not provide an export named 'computed'\r\n at ModuleJob._instantiate (node:internal/modules/esm/module_job:121:21)\r\n at async ModuleJob.run (node:internal/modules/esm/module_job:171:5)\r\n\r\nRemote\r\nSystem : Linux *86\r\nnode : v16.1.0\r\nnpm: 8.0.0\r\n\r\n\r\nbut I don't have this problem on my local window system\r\n\r\nlocal :\r\nsystem : window10\r\nnode:14.19.1\r\nnpm: 6.14.16",[],238,"The requested module 'vue-demi' does not provide an export named 'computed'","2023-06-12T10:58:49Z","https://github.com/vueuse/vue-demi/issues/238",0.72842544,{"description":3215,"labels":3216,"number":3217,"owner":3141,"repository":3141,"state":3152,"title":3218,"updated_at":3219,"url":3220,"score":3221},"I encountered a problem with using get in my code when trying to use `get(something)` \r\n```\r\nUncaught (in promise) TypeError: vue_demi__WEBPACK_IMPORTED_MODULE_0__.unref(...) is undefined\r\n node_modules vueuse/shared/index.mjs:498\r\n```",[],832,"Using `get` throws an error","2021-10-10T18:18:36Z","https://github.com/vueuse/vueuse/issues/832",0.72930723,["Reactive",3223],{},["Set"],["ShallowReactive",3226],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fn1ezSpW-hVyZXnM2vc8hDEamPw5EiYGzdg2I_FCbcOQ":-1},"/vueuse/sound/47"]