【问题标题】:jsconfig.json error: "node_modules/html-entities/lib/index" not foundjsconfig.json 错误:找不到“node_modules/html-entities/lib/index”
【发布时间】:2020-11-30 23:07:16
【问题描述】:

这是我的jsconfig.json 文件:

{
  "compilerOptions": {
      "baseUrl": ".",
      "target": "es6",
      "module": "commonjs",
      "paths": {
        "@analytics/*": ["./src/analytics/*"],
        "@assets/*": ["./src/assets/*"],
        "@components/*": ["./src/components/*"],
        "@constants/*": ["./src/constants/*"],
        "@cookies/*": ["./src/cookies/*"],
        "@helpers/*": ["./src/helpers/*"],
        "@helmet/*": ["./src/helmet/*"],
        "@hooks/*": ["./src/hooks/*"],
        "@layout/*": ["./src/layout/*"],
        "@pages/*": ["./src/pages/*"],
        "@redux/*": ["./src/redux/*"],
        "@routes/*": ["./src/routes/*"],
        "@styles/*": ["./src/styles/*"],
        "@src/*": ["./src/*"]
      }
  },
  "include": [
    "src/**/*", "scripts"
  ]
}

此文件触发了这 3 个相同错误的实例。

"node_modules/html-entities/lib/index" not found

发生了什么?我怎样才能摆脱它?

【问题讨论】:

  • 我也遇到过类似的错误。尝试重新启动 vscode 或尝试添加 exclude 属性。参考:jsconfig\.json Reference

标签: visual-studio-code vscode-jsconfig


【解决方案1】:

我刚遇到这个问题。重新启动 VScode 即可解决问题。

【讨论】:

  • 是的,就是这样,为我工作!毕竟真正的通用解决方案
猜你喜欢
  • 2021-09-11
  • 2014-10-03
  • 2020-11-17
  • 1970-01-01
  • 2022-08-07
  • 2021-09-21
  • 2019-06-13
  • 2020-06-24
  • 1970-01-01
相关资源
最近更新 更多