The configuration file tsconfig.json did not contain any input

After downloading angular2-highcharts through npm for my application, I encountered an error in the tsconfig.json file of the package while using Visual Studio Code:

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'

The cause of this error is unclear to me, and I'm unsure how to resolve it.

Below is a snippet of the tsconfig.json 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
  }
}

If you have any insights or suggestions on how to address this issue, I would greatly appreciate it. Thank you!

Answer №1

In order for the TS compiler to work properly, it requires a .ts file in the same directory as your tsconfig.json file. Simply create an empty file.ts in that directory and the error message should disappear.

Answer №2

One important step that slipped my mind was doing the following: COPY src/ ./src/ This command copies over the contents of my src folder. Once I have completed the copy process, I can proceed to execute the following commands:

RUN yarn install --ignore-engines RUN yarn tsc

Answer №3

Typically, when dealing with a problem related to a library, the recommended steps are:

  • First, explore the library's issue tracker for similar issues.
  • If no solutions are found, you should then create a new issue, following the provided template and providing detailed information about your environment (such as TypeScript, tslint, npm versions, editor, and OS).

However, it is advisable to check the tag first as per their issue template before proceeding, in case there is already a known solution available.

Local fixes may not work as changes made will be overwritten during npm install or update processes since the issue lies within the package source code.

If you manage to debug locally and find a fix, contributing through a pull request would be appreciated by the maintainers.

From a practical standpoint, if the error is related to incorrect relative pathing, it is unlikely that such an issue would pass the publishing stage. It could potentially be a bug within VSCode or the linting tools being used.

It is crucial to ensure that you are using the latest version of the package (@latest or @next) for better compatibility and potential bug fixes.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Improving access for disabled individuals in HTML through tab-index usage

Hey there, I'm currently dealing with some challenges regarding tab-index for disabled elements. It seems that we are unable to focus on the elements, as screen reader tools are not announcing them and are skipping over them directly. For example: I ...

Guide on initiating document-wide events using Jasmine tests in Angular 2/4

As stated in the Angular Testing guidelines, triggering events from tests requires using the triggerEventHandler() method on the debug element. This method accepts the event name and the object. It is effective when adding events with HostListener, such as ...

What is the best way to globally incorporate tether or any other feature in my Meteor 1.3 TypeScript project?

I've been working hard to get my ng2-prototype up and running in a meteor1.3 environment. Previously, I was using webpack to build the prototype and utilized a provide plugin to make jQuery and Tether available during module building: plugins: [ ne ...

Issue with NGXS Selector Observable not reflecting updated state

My issue is that when I update the state, my selector does not pull the new values. I have defined the selector in my state and I can see the state values getting updated. However, the selector in my component is not fetching the latest values. Even though ...

Converting JSON data retrieved from a URL into HTML format

I have a JSON output from a URL that I need to format into html. The structure of the JSON data is as follows: prtg-version "xxxxxxx" treesize 0 channels 0 name "Downtime" name_raw "Downtime" lastvalue "" lastvalue_raw "" 1 name ...

Issue with Angular custom tag displaying and running a function

I have created a custom HTML tag. In my next.component.ts file, I defined the following: @Component({ selector: 'nextbutton', template: ` <button (click) = "nextfunc()">Next</button> ` }) export class NextComponent{ nextfunc( ...

The type 'FormikValues' is deficient in the subsequent properties compared to the type 'Exact<{'

I am currently working on a form with the following structure: import { Field, Form, Formik, FormikProps, FormikValues } from 'formik' import { NextPage } from 'next' import React from 'react' import { useCreateUserMutation } ...

Filter out properties from Java object with Spring framework

@PostMapping("/retrieveLargeCarList") public ResponseEntity<Cars> getLargeList( @Parameter(description = "request dto for large list") @RequestBody SearchRequest searchRequest) { return ResponseEntity.ok(someService.s ...

"Encountered an error while trying to access the 'get' property of an undefined object in Angular 7 Forms

I encountered an issue while working on Angular 7 forms. The built-in validation for the form functioned flawlessly, but when attempting to implement custom validation by creating a custom function, I faced an error related to the userpass field. My intent ...

Dynamic population of dropdown not working as expected

Below is the code I am using to populate a Dropdown: $(document).ready(function(){ $('#inDistrict').sSelect(); $("#inDistrict").change(function(){ $.getJSON("filldistricts.php",{id: $(this).val(), ajax: 'true'}, function(j) ...

Whenever I execute the 'ng serve' command, I encounter an issue with ineffective mark-compacts close to the heap limit, resulting in an allocation failure and a JavaScript

I'm currently using Angular 9 and Node.js 12. When I input ng serve, I encounter the following problem: C:\Users\homz\my-app>ng serve 93% after chunk asset optimization SourceMapDevToolPlugin vendor.js generate SourceMap <--- ...

issue encountered when implementing slick.js in angular 6

Trying to implement slick.js, a carousel framework, in an Angular project. Initially attempted 'npm install slick --save' and manually adding the downloaded files to scripts and styles JSON objects. When that failed, resorted to importing the C ...

Displaying exclusively distinct values in the selection box/dropdown menu

My goal is to retrieve data from the SQL server database and populate the corresponding fields on the frontend. While I am able to fetch the data, some fields in the response contain duplicate values in the dropdown menu. Here is an example of how my Compo ...

Utilizing nested namespaces for optimal organization and clarity

Is it possible to export a namespace A with another namespace B nested within it? For example: // b.ts export namespace B { export const val = 'val'; } // a.ts export namespace A { //... some thing import B as namespace } --- the above wil ...

Guide on transforming observable<User> to Observable<boolean> in Angular 4

As a newcomer in Angular and Mean Stack, I need help implementing the canActivate() method to restrict admin routes. In my service file, the checkAdmin method returns an observable of type "User", but the canActivate method's return type is an observa ...

After analyzing the JSON file data, include annotations in the resulting XML file

After flattening the parsed JSON data, I find it necessary to incorporate comments that can serve as titles and provide separation between code lines. This will allow for a clearer overview of the XML output. The comment text can be derived from the high-l ...

Tips for attaching an event listener to a div element that is accessed by reference in a React and TypeScript environment

I am attempting to attach an event listener to the div element using a ref. In my code, I have added a ref called div_ref to the Wrapper div and accessed that div_ref in the enableDragEventListeners method to add event listeners to it on component mount. ...

Tips for injecting scripts into the head tag after an Angular component has been loaded

Currently, I am facing an issue with a script tag containing a Skype web control CDN. The script has been placed in the head section of my index.html file, but it is being called before the component that needs it has finished loading. Does anyone have a ...

Oops! The type 'List<dynamic>' cannot be assigned to the type 'Map<String, dynamic>'

I am currently working on retrieving additional information about users once they have entered their email and password. The API that I am utilizing returns extra user details, so my initial goal is to retrieve this information. My objective involves pars ...

Prevent loading data in Angular 5 by handling errors from undefined objects

Is there a way to avoid console errors from undefined objects? Imagine I have the following code: name : string; constructor(private data: DataService) { this.data.name.subscribe(res => this.name = res); } In my HTML, I have this: <p> {{name}} ...