Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) SyntaxError: The requested module '/@modules/element-plus.js' does not provide an export named 'ElMessage' #667

Closed
em2046 opened this issue Nov 24, 2020 · 6 comments

Comments

@em2046
Copy link

em2046 commented Nov 24, 2020

https://element-plus.org/#/en-US/component/message
Local import
import { ElMessage } from 'element-plus';

error: Uncaught (in promise) SyntaxError: The requested module '/@modules/element-plus.js' does not provide an export named 'ElMessage'

if using
import ElMessage from 'element-plus/lib/el-message';
error: Uncaught (in promise) SyntaxError: The requested module '/@modules/element-plus/lib/utils/util.js' does not provide an export named 'isVNode'

"element-plus": "^1.0.1-alpha.20",
"vue": "^3.0.2",
"vite": "^1.0.0-rc.9"
@zazzaz
Copy link
Contributor

zazzaz commented Nov 24, 2020

This might be Vite bug, ref here vitejs/vite#837.

You can use Webpack bundle at this moment before Vite fix it.

@lqsong
Copy link

lqsong commented Nov 24, 2020

This might be Vite bug, ref here vitejs/vite#837.

You can use Webpack bundle at this moment before Vite fix it.

import { ElMessage } from 'element-plus';

TypeScript Tips:

Module '"../../../../node_modules/element-plus/types"' has no exported member 'ElMessage'. Did you mean 'Message'?Vetur(2724)

Other:

import { ElNotification } from 'element-plus';
.
.
.
import { El*** } from 'element-plus';

TypeScript Tips:

Module '"../../../../node_modules/element-plus/types"' has no exported member 'El***'. Did you mean '***'?Vetur(2724)

@zazzaz
Copy link
Contributor

zazzaz commented Nov 27, 2020

fixed in 1.0.1-alpha.23

you can use

import { ElMessage } from 'element-plus';

@zazzaz zazzaz closed this as completed Nov 27, 2020
@zazzaz zazzaz reopened this Nov 28, 2020
@zazzaz
Copy link
Contributor

zazzaz commented Nov 28, 2020

still not fixed

@jw-foss
Copy link
Member

jw-foss commented Dec 1, 2020

@zazzaz Is this fixed in #577 Or #749 ?

@zazzaz
Copy link
Contributor

zazzaz commented Dec 2, 2020

fixed in #577 please use beta-1 release

@zazzaz zazzaz closed this as completed Dec 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants