Uncaught Error: Dynamic require of "vue-demi" is not supported
See original GitHub issueNot sure if it’s a @vueuse
issue
Environment
- Operating System: Windows_NT
- Node Version: v16.13.0
- Nuxt Version: 3.0.0-27324955.23397e6
- Element-Plus version: 1.2.0-beta.6
- Package Manager: pnpm@6.24.1
- Bundler: Vite
- User Config: -
- Runtime Modules: -
- Build Modules: -
Reproduction
git clone https://github.com/element-plus/element-plus-nuxt-starter.git
cd element-plus-nuxt-starter
pnpm install
pnpm run dev
# Browser access: http://localhost:3000
touch package.json
{
"private": true,
"scripts": {
"build": "nuxi build",
"dev": "nuxi dev",
"start": "node .output/server/index.mjs",
"generate": "export NITRO_PRESET=browser && npm run build"
},
"dependencies": {
"pinia": "^2.0.5"
},
"devDependencies": {
"@pinia/nuxt": "^0.1.6",
"element-plus": "1.2.0-beta.6",
"nuxt3": "3.0.0-27324955.23397e6",
"sass": "^1.44.0",
"typescript": "^4.5.4"
},
"pnpm": {
"overrides": {
"@nuxt/kit": "npm:@nuxt/kit-edge@3.0.0-27324955.23397e6",
"@nuxt/kit-edge": "3.0.0-27324955.23397e6",
"@vueuse/core": "7.3.0",
"@vueuse/shared": "7.3.0"
}
}
}
Describe the bug
Uncaught Error: Dynamic require of "vue-demi" is not supported
at chunk-EABY2BFN.js?v=9c4aff8c:26
at node_modules/.pnpm/registry.npmmirror.com+@vueuse+shared@7.3.0/node_modules/@vueuse/shared/index.cjs (index.cjs:5)
at __require2 (chunk-EABY2BFN.js?v=9c4aff8c:32)
at node_modules/.pnpm/registry.npmmirror.com+@vueuse+core@7.3.0/node_modules/@vueuse/core/index.cjs (index.cjs:5)
at __require2 (chunk-EABY2BFN.js?v=9c4aff8c:32)
at node_modules/.pnpm/registry.npmmirror.com+element-plus@1.2.0-beta.6/node_modules/element-plus/lib/hooks/use-modal/index.js (aria.ts:178)
at __require2 (chunk-EABY2BFN.js?v=9c4aff8c:32)
at node_modules/.pnpm/registry.npmmirror.com+element-plus@1.2.0-beta.6/node_modules/element-plus/lib/hooks/index.js (index.js:12)
at __require2 (chunk-EABY2BFN.js?v=9c4aff8c:32)
at node_modules/.pnpm/registry.npmmirror.com+element-plus@1.2.0-beta.6/node_modules/element-plus/lib/make-installer.js (version.ts:1)
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Uncaught Error: Dynamic require of "vue-demi" is not supported
I got this error in Nuxt 3 … have any idea. My Package.json file. “devDependencies”: { “@originjs/vite-plugin-commonjs”: “^1.0.1”,
Read more >vite-plugin-dynamic-import - npm
Start using vite-plugin-dynamic-import in your project by running `npm i vite-plugin-dynamic-import`. There are 2 other projects in the npm ...
Read more >Vue 3 - Dynamic require of "highcharts" is not supported
I think the cause of the issue is this config: optimizeDeps: { exclude: ['highcharts'], // ❌ don't do this }.
Read more >nuxt3全量引入Element-plus UI - 简书
chunk-EABY2BFN.js?v=2a9e977c:26 Uncaught (in promise) Error: Dynamic require of "vue-demi" is not supported
Read more >Build a universal Vue component library with Vue Demi
Vue Demi solves this problem by providing universal support for both ... These are the properties the user will be required (or not, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Already fixed:https://github.com/element-plus/element-plus-nuxt-starter/commit/98aa178d5031359d67653e1b5f5f7611ab94ca1f
I can confirm that this issue is happening as well with the latest version of Nuxt, and any composition API library built on /with @vueuse/core …