question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: Dynamic require of "vue-demi" is not supported

See original GitHub issue

Not 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:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
xiaoxian521commented, Feb 21, 2022

same problem. element-plus cannot be use in nuxt3 now.

Already fixed:https://github.com/element-plus/element-plus-nuxt-starter/commit/98aa178d5031359d67653e1b5f5f7611ab94ca1f

1reaction
michealrobertscommented, Dec 29, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found