-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
vite 创建vue项目,安装vuex后vscode报错,Could not find a declaration file for module 'vuex'. #2223
Comments
same issue . Has anyone fixed it yet? |
@dungtv1291 you can look this issue issues/2213 |
fixing it in the node_modules folder is not a good idea |
Here is my workaround: #2213 (comment) |
Although fixing it in the node_ modules folder is not a good idea, but. it does work. Many thxs |
Solved: #2213 (comment) |
I fixed this with a d.ts file, on my src/ directory
|
Note that if you're using declare module "vuex" {
export * from "vuex/types/index.d.ts";
export * from "vuex/types/helpers.d.ts";
export * from "vuex/types/logger.d.ts";
export type * from "vuex/types/vue.d.ts";
} |
你的邮件我已收到!
|
使用npm init vue@latest安装的vue项目,
安装vuex后
store引入vuex,ts报错
Could not find a declaration file for module 'vuex'. 'g:/dg-b-front/node_modules/vuex/dist/vuex.mjs' implicitly has an 'any' type. There are types at 'g:/dg-b-front/node_modules/vuex/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'vuex' library may need to update its package.json or typings.ts(7016)
The text was updated successfully, but these errors were encountered: