Typescript no inputs were found in config file

No inputs were found in config file

Why typescript keep giving me No inputs were found in config file error?

include expects relative path so and you added app.ts in exclude

Edit: as you don’t have tsconfig on root dir try this

Npm server with Typescript error TS18003, error TS18003: No inputs were found in config file ‘D:/practical/ang1/tsconfig.json’. Specified ‘include’ paths were ‘[«**/»]’ and ‘exclude’

No inputs were found in config file ‘tsconfig.json’. Specified ‘include’ paths were in Angular 6

Because the error says ‘exclude’ paths were ‘[» / .spec.ts»,» /.stub.ts»,»test/**/*.ts»]’, You need to have a *.ts file in the directory or sub directory, in which the tsconfig.app.json file resides with the include and exclude properties declared.

The «include» and «exclude» properties take a list of glob-like file patterns. The supported glob wildcards are:

  • ‘*’ matches zero or more characters (excluding directory separators)
  • ‘?’ matches any one character (excluding directory separators)
  • ‘**/’ recursively matches any subdirectory
Читайте также:  How to run index php

If a segment of a glob pattern includes only * or .*, then only files with supported extensions are included (e.g. .ts, .tsx, and .d.ts by default with .js and .jsx if allowJs is set to true).

You can refer this for more help

How to add tsconfig to razor class library nuget package, I got this working by adding the following block to my csproj file of the razor class library.

No input was found in config file tsconfig.json

The TS compiler want’s to have a .ts file in the directory where your tsconfig.json is located. Create an empty file.ts in the same directory and the error should go away.

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).

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

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.

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.

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

In my case, I forgot to do this: COPY src/ ./src/ It will copy my src folder. Then after copying, I can now run: RUN yarn install —ignore-engines RUN yarn tsc

Error TS18003: No inputs were found in config file in node js, It looks like a tsconfig.json file is putting the «include» field under «compilerOptions» , but include is a top-level field of the

Tsickle says «Error No inputs were found in config file» if I call it with tsconfig.json in a different directory

According to this Github issue, there is some incompatibility between tsickle and the typescript.

The probable reason can be that neither side want to admit that it is their mistake, thus none of them wants to fix it.

The solution is this: either the tsconfig.json given to the tsickle should have an absolute path, or the include: in this tsconfig.json should use an absolute path .

Considering that the .json format is not a very configurable thing (for example, you simply can’t give an include: [ __dirname + ‘/my/lib/**.ts’ ] setting in it), the probably better option is to simply give an absolute path to the tsickle.

In my case, I simply extended an arguments: [‘-p’, ‘src/tsconfig.json’] in my Gruntfile to arguments: [‘-p’, __dirname + ‘src/tsconfig.json’] . If you use a different build tool, your actual solution my differ from it, but it is the important part.

No inputs were found in config file ‘tsconfig.json’. Specified ‘include, I am upgrading my angular 4 to angular 6 application. I am getting the following error while building my application. error TS18003: No inputs

Источник

No input was found in config file tsconfig.json

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:

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' 
< "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 >> 

3 Answers 3

The TS compiler want’s to have a .ts file in the directory where your tsconfig.json is located. Create an empty file.ts in the same directory and the error should go away.

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 onein 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).

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

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.

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.

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

Источник

How To Solve “No inputs were found in config file” in TypeScript

When working with a project where the main technology to use is not TypeScript but still requires TypeScript to be able to build the project, when there is no ts file in your project directory, it will lead to “No inputs were found in config file” error. This article will give some workarounds, such as creating an empty ts file and reviewing the configuration in the tsconfig.json file.

The cause of the error “No inputs were found in config file” in TypeScript

The error occurs when we build a TypeScript project but without any ts files in the project directory. The error may be caused by a misconfiguration in the tsconfig.json file.

For example, if we run the syntax npx tsc in a directory without a ts file, you will get the following error:

error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["*/"]' and 'exclude' paths were '[]'.

Solution to solve this error

To solve this error, we will create a file with the extension ts so that the TypeScript compiler does not report any more errors. This ts file must be in the path declared in the «exclude» array declared in the tsconfig.json file. If we declare the wrong path can also lead to this error

We will create an empty ts file with the following content:

Then we will review the path in the tsconfig.json file, and then we paste that file into the path in the «include» array.

< "compilerOptions": <>, "include": ["src/*/"], "exclude": ["node_modules"] >

As you can see, we will create the ts file and place it in the src folder. Then you restart the TypeScript server and the IDE

The error can happen when you write the wrong working directory in the «exclude» array

TypeScript will ignore all files written in this array and not build them.

In general, TypeScript requires registration in the project for proper installation and debugging.
If you are not using TypeScript in your project, but you are still getting the error and restarting the IDE doesn’t work, you can create a tsconfig.json file in the root of your project just to disable the error.

Summary

In short, the error “No inputs were found in config file” in TypeScript occurs because we performed a TypeScript project build, but there is no ts file, or we pointed to the wrong path. To solve it, we create an empty ts file and put it in the path that has been configured in the tsconfig.json file. Hope the article is helpful to you. Thanks for reading.

Carolyn Hise has three years of software development expertise. Strong familiarity with the following languages is required: Python, Typescript/Nodejs, .Net, Java, C++, and a strong foundation in Object-oriented programming (OOP).

Источник

Оцените статью