2

I recieve the blow error when running the angular project with the few libraries in the assets folder, this error does not blong to tradview chart instead it blongs to Angular. This error does not apear in the angular , I use angular 6.

ERROR in src/assets/charting_library/charting_library.min.d.ts(1,23): error TS2688: Cannot find type definition file for 'jquery'.
src/assets/charting_library/charting_library.min.d.ts(121,14): error TS2304: Cannot find name 'JQuery'.
src/assets/charting_library/charting_library.min.d.ts(124,93): error TS2304: Cannot find name 'JQuery'.
src/assets/charting_library/charting_library.min.d.ts(259,40): error TS2304: Cannot find name 'JQueryEventObject'.
src/assets/charting_library/charting_library.min.d.ts(1205,47): error TS2304: Cannot find name 'JQuery'.
src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(243,74): error TS2339: Property 'errmsg' does not exist on type 'UdfErrorResponse | UdfSearchSymbolsResponse'.
  Property 'errmsg' does not exist on type 'UdfSearchSymbolsResponse'.
src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(248,15): error TS2345: Argument of type 'UdfErrorResponse | UdfSearchSymbolsResponse' is not assignable to parameter of type 'SearchSymbolResultItem[]'.
  Type 'UdfErrorResponse' is not assignable to type 'SearchSymbolResultItem[]'.
    Property 'includes' is missing in type 'UdfErrorResponse'.
src/assets/datafeeds/udf/src/udf-compatible-datafeed-base.ts(284,21): error TS2345: Argument of type 'UdfErrorResponse | ResolveSymbolResponse' is not assignable to parameter of type 'LibrarySymbolInfo'.
  Type 'UdfErrorResponse' is not assignable to type 'LibrarySymbolInfo'.
    Property 'name' is missing in type 'UdfErrorResponse'.

2

1 Answer 1

0

Did you add jquery.min.css to the "styles" array inside packages.json?

You need to add jquery package to package.json and add a reference inside angular.json. You would already have something like this inside styles array of angular.json:

"styles": [
          "src/styles.css"
        ]

Make sure you add the main jquery css before other libraries that depend on it, so that jquery is loaded first.

Not the answer you're looking for? Browse other questions tagged or ask your own question.