Subscribe on changes!

The requested module '/node_modules/.vite/vue.js?v=1f26b19c' does not provide an export named 'createElementBlock'

avatar
Aug 11th 2021

Version

3.2.1

Steps to reproduce

The error likes a ghost without call stack. Once you do something like reopening project, changing code, it maybe disappears. vite 2.4.4, vue 3.2.1

Same issues

vite issue element-plus issue

What is expected?

No error

What is actually happening?

The requested module '/node_modules/.vite/vue.js?v=1f26b19c' does not provide an export named 'createElementBlock'

avatar
Aug 11th 2021

Please provide a working link

avatar
Aug 11th 2021

Hello, make sure to always provide a reproduction that follows the instructions at https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro.

Open a new issue with a reproduction that follows those instructions if you manage to create a build down reproduction.

avatar
Aug 13th 2021

I reappeared, and i downgraded @vue/compiler-sfc to 3.0.4, it work.

avatar
Aug 13th 2021

@Hansuku My project's dependencies are newest.

"vue": "^3.2.2"
"@vue/compiler-sfc": "^3.2.2"

I found a weird solution that does not needs to downgrade dep package. Maybe you need to try a few times.

rm -fr node_modules package-lock.json
npm install

But the error appears irregularly, and I still cannot find the error source.

avatar
Aug 13th 2021

When you have an install where the error pops up, try running yarn why vue. It will tell you which packages are depending on which version of vue.

From what we have seen elsewhere, this happens when a dependency has a dependency of vue <3.2. elelement-plus, for example, locks the vue version on 3.1.x:

https://github.com/element-plus/element-plus/blob/9f76045da61e96ec90f1ff69848625f19b4a703e/package.json#L35-L37