element-plus: [Bug Report] Uncaught SyntaxError: The requested module '/node_modules/.vite/vue.js?v=a348567b' does not provide an export named 'createElementBlock'

Element Plus version

1.0.2-beta.70 (any)

Version

OS/Browsers macOS 11.4 node 14.5.0 npm 7.14.0 vite latest

Steps to reproduce

$ npm init vite@latest
$ cd vite-project
$ npm i
$ npm run dev  # ok
$ npm i -S element-plus@latest 
$ npm run dev  # error

What is Expected?

It works normally in vue/cli

What is actually happening?

Chrome Browser Devtools :

HelloWorld.vue:28 Uncaught SyntaxError: The requested module '/node_modules/.vite/vue.js?v=a348567b' does not provide an export named 'createElementBlock'

when I remove it

 $ npm uninstall element-plus

still

HelloWorld.vue:28 Uncaught SyntaxError: The requested module '/node_modules/.vite/vue.js?v=a348567b' does not provide an export named 'createElementBlock'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (4 by maintainers)

Most upvoted comments

@noyidoit what is the exact version of Vue ?

I had this same issue 10 secondes ago, I updated my package.json to use Vue 3.2.2 and the issue is gone.

Similar error, and I have made a simple test/reproduce for that: , using default 3 setting

and it shows:vue create test``npm install element-plus --save``npm run serve

image

When I access localhost:8080 using browser: image

I(vue: 3.15) upgraded it to (vue)3.2+and solved the same problem as you

@flydev-fr @clai-wh it will has npm error because version of vue . image

so it must use --force

You can try upgrading the version of vue using ‘–force’ … and maybe can solved this problem

Just upgrade to the latest version of Vue. I hope to update it as soon as possible