如何将现有项目与jsconfig集成

She*_*r_Y 4 javascript reactjs visual-studio-code

节点错误截图 我即将jsconfig.json与我现有的项目集成,以从其baseurl选项中受益。正如 vs-code 所示的模板,我将 jsconfig.json 添加到我的客户端文件夹(它有自己的 node_modules,与服务器完全分离)。但好像不起作用。同时,它在 jsconfig 文件的开头显示错误client/node_modules/harmony-reflect/index' not found,但是当我yarn addHarmony-reflect 到客户端模块时,错误仍然存​​在。这是代码:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "components/*": ["./src/js/components/*"]
    },
    "module": "es6",
    "target": "es2020"
  },
  "exclude": ["node_modules"]
}
Run Code Online (Sandbox Code Playgroud)

你们能帮我解决这个问题吗?谢谢!

big*_*web 5

我重新打开编辑器,问题就解决了。