vue3 + ts 的环境时,找不到模块“vue-router”。

问题:找不到模块“vue-router”。你的意思是要将 "moduleResolution" 选项设置为 "node",还是要将别名添加到 "paths" 选项中?ts(2792)
原因:未知
解决方案:
将 tsconfig.json 文件中的内容


{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    },
    {
      "path": "./tsconfig.app.json"
    },
  ]
}

更改为

{
  "files": [],
  "references": [
    {
      "paths": {
        "vuex": ["node_modules/vuex/types/index.d.ts"],
        "vue-router": ["node_modules/........"]
      }
    }
  ]
}

没有安装模块吧npm install vue-router -S