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
我也遇到了同样的错误,求解决方式 |
同上,也遇到了这个问题 |
同上,我也遇到了这个问题 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: