【问题标题】:electron-forge --template=typescript-webpack in vscode giving error Unable to resolve path to module './moduleName'vscode 中的 electron-forge --template=typescript-webpack 给出错误 Unable to resolve path to module './moduleName'
【发布时间】:2020-06-19 16:33:49
【问题描述】:

应用程序在yarn start 下运行良好,因此 webpack 可以很好地找到该模块。我无法让 vscode 看到它。

【问题讨论】:

    标签: visual-studio-code eslint electron-forge


    【解决方案1】:

    你需要安装eslint-import-resolver-typescript

    yarn add --dev eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
    

    此外,在 dotfile .eslintrc.js 上,确保包含在根目录中:

    "settings": {
      "import/resolver": {
        "typescript": {},
      },
    },
    

    【讨论】:

      猜你喜欢
      • 2017-09-30
      • 1970-01-01
      • 2017-10-26
      • 2021-11-13
      • 1970-01-01
      • 2012-07-01
      • 2022-11-05
      • 2020-01-24
      • 1970-01-01
      相关资源
      最近更新 更多