Skip to content

vite 创建vue项目,安装vuex后vscode报错,Could not find a declaration file for module 'vuex'. #2223

Open
@WakerCN

Description

@WakerCN

使用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)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions