-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
[TypeScript] [message, message-box] when tsconfig.json set moduleResolution to nodenext or bundler, ElMessage can not be imported. #11818
Comments
|
|
It should be related with a break change into the TS versionof "dependencies": {
"element-plus": "^2.3.4",
"vue": "^3.2.47"
}
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.1",
"@vue/tsconfig": "0.1.3", /* <-- important fix */
"typescript": "4.9.5", /* <-- important fix */
"vite": "^4.3.5",
"vue-tsc": "^1.6.4"
} |
The problem is with |
@FabianMontoya You can. This problem is caused by If you want to use If not work for you, please see #11818 (comment). |
Thank you for posting this, @ModyQyW . This solution worked for me on TypeScript 5.0.4. |
@aknot242 @ModyQyW
npm run build error ,not working
How to resolve ? Thanks! |
依赖:
import { ElMessage } from 'element-plus'; 报错: |
@toplinuxsir try putting the following in each of your tsconfig files ( {
"compilerOptions": {
"moduleResolution": "node"
}
} |
@aknot242 Thanks! It works! |
@aknot242 Sry the way not work for me, or could U pls help to see is there any error with my configration? |
@Sheepeer Is it not worked for you? |
@Sheepeer Have you reloaded vscode window or restarted vscode? |
OHHH I forgot! So much Thx!!! |
Any progress? Once |
#12602 Good Job |
good, Simply modify tsconfig.app.json |
Bug Type:
TypeScript
Environment
3.2.47
2.2.33
110.0.5481.100(正式版本) (x86_64)/mac os 12.6.3
Other
Reproduction
Related Component
el-message
el-message-box
Reproduction Link
Github Repo
Steps to reproduce
What is Expected?
no error
What is actually happening?
has error
Additional comments
(empty)
The text was updated successfully, but these errors were encountered: