-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Cannot find module 'unplugin-element-plus/vite' or its corresponding type declarations. #189
Comments
我也遇到了同样的错误,求解决方式 |
@sjqw @yxb94616 我也遇到了这个问题,暂时没找到很好的解决方案,但我找到了别的办法,因为我之前的项目这么写是没问题的,所以我查看了版本号,之前的安装的是0.4.1的,所以如果你也不知道怎么解决,安装0.4.1版本可能是一个不错的办法,或者直接使用
|
同上,也遇到了这个问题 |
同上,我也遇到了这个问题 OS: Windows10 x64 vite:4.2.1 |
@sjqw @heyongsheng @L-T-G @skyclouds2001
错误解决后,引入插件使用的话,插件必须传参数,这个是插件的问题,目前我传的是
造成这个错误的原因是因为 typescript 的模块解析策略问题,有兴趣可以了解一下,推荐几篇文章: https://www.typescriptlang.org/docs/handbook/module-resolution.html |
+1 |
"moduleResolution": "bundler" |
just add // @ts-ignore |
if using @ts-ignore to disable this ts error, @ts-expect-error is much better |
Yeah!👍 we expected for more better! @element-bot #unplugin-element-plus |
VsCode Version: 1.77.1
Node.js: 16.14.2
OS: Windows10 x64 10.0.19045
"vite": "^4.2.1"
"unplugin-element-plus": "^0.7.0"
"typescript": "^4.9.5"
在vite中使用:
import ElementPlus from "unplugin-element-plus/vite";
报了一个 typescript 错误:
Cannot find module 'unplugin-element-plus/vite' or its corresponding type declarations.
The text was updated successfully, but these errors were encountered: