在配置文件tsconfig.json中没有找到输入

时间:2021-04-25 23:38:16

Through npm I have downloaded angular2-highcharts for my application. I just noticed that Visual Studio Code gives me an error in the tsconfig.json file of the package:

通过npm,我已经为我的应用下载了angular2-highcharts。我刚刚注意到Visual Studio代码在tsconfig中给了我一个错误。软件包的json文件:

file: 'file:///c%3A/pdws-view-v2/node_modules/angular2-highcharts/tsconfig.json'
severity: 'Error'
message: 'No inputs were found in config file 'c:/pdws-view-v2/node_modules/angular2-highcharts/tsconfig.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '["examples","index.d.ts","node_modules","dist"]'.'
at: '1,1'
source: 'ts'

I don't really know why I'm getting this error or how to fix it.

我不知道为什么会出现这个错误,也不知道如何修正。

Here's the file:

这是文件:

{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "removeComments": true,
    "sourceMap": true,
    "outDir": "dist",
    "declarationDir": "dist",
    "declaration": true
  },
  "compileOnSave": true,
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "examples",
    "index.d.ts",
    "node_modules",
    "dist"
  ],
  "angularCompilerOptions": {
    "genDir": "dist/",
    "strictMetadataEmit": true,
    "skipTemplateCodegen": true
  }
}

Any ideas? Thanks!

什么好主意吗?谢谢!

1 个解决方案

#1


0  

Generally, if it's an issue with a library, you should:

一般来说,如果是图书馆的问题,你应该:

  • Search the library's issue tracker for similar issues
  • 在库的问题跟踪器中搜索类似的问题
  • If none are found, create one in accordance with the issue template they provide, giving as much detail as you can about the environment you are compiling in (especially TypeScript, tslint and npm version, and your editor and OS).
  • 如果没有找到,根据他们提供的问题模板创建一个,尽可能详细地介绍您正在编译的环境(特别是打字稿、tslint和npm版本,以及您的编辑器和OS)。

That said, their issue template specifically asks that you check here for first, so do wait and see if anyone else answers with a known solution for your case.

也就是说,他们的问题模板特别要求您首先在这里检查angular2-highcharts,所以请等待,看看是否有其他人对您的案例给出了已知的解决方案。

You can't really fix it locally because it's in the package's source, so next time you npm install or npm update, your changes will be obliterated.

您不能在本地修复它,因为它在包的源代码中,所以下次您安装npm或npm更新时,您的更改将被删除。

Of course, if you debug locally and find a solution, I'm sure they would welcome a pull request.

当然,如果您在本地调试并找到解决方案,我相信他们会欢迎拉取请求。

Practically speaking, it sounds like the relative path to the source is incorrect, but it would be astonishing for this to get published. So it might be a bug in VSCode or your linter reporting.

从实际的角度来说,这听起来像是源的相对路径是不正确的,但是这将是令人惊讶的发表。所以这可能是VSCode或linter报告中的错误。

This also assumes you have the most up to date version of the package (@latest or even @next).

这也假定您拥有包的最新版本(@latest甚至@next)。

#1


0  

Generally, if it's an issue with a library, you should:

一般来说,如果是图书馆的问题,你应该:

  • Search the library's issue tracker for similar issues
  • 在库的问题跟踪器中搜索类似的问题
  • If none are found, create one in accordance with the issue template they provide, giving as much detail as you can about the environment you are compiling in (especially TypeScript, tslint and npm version, and your editor and OS).
  • 如果没有找到,根据他们提供的问题模板创建一个,尽可能详细地介绍您正在编译的环境(特别是打字稿、tslint和npm版本,以及您的编辑器和OS)。

That said, their issue template specifically asks that you check here for first, so do wait and see if anyone else answers with a known solution for your case.

也就是说,他们的问题模板特别要求您首先在这里检查angular2-highcharts,所以请等待,看看是否有其他人对您的案例给出了已知的解决方案。

You can't really fix it locally because it's in the package's source, so next time you npm install or npm update, your changes will be obliterated.

您不能在本地修复它,因为它在包的源代码中,所以下次您安装npm或npm更新时,您的更改将被删除。

Of course, if you debug locally and find a solution, I'm sure they would welcome a pull request.

当然,如果您在本地调试并找到解决方案,我相信他们会欢迎拉取请求。

Practically speaking, it sounds like the relative path to the source is incorrect, but it would be astonishing for this to get published. So it might be a bug in VSCode or your linter reporting.

从实际的角度来说,这听起来像是源的相对路径是不正确的,但是这将是令人惊讶的发表。所以这可能是VSCode或linter报告中的错误。

This also assumes you have the most up to date version of the package (@latest or even @next).

这也假定您拥有包的最新版本(@latest甚至@next)。