amcharts4 is not compiling with angular 6












3














I'm having trouble with compiling my app when including amcharts4. I have simply installed the amcharts4 npm package and am trying to use it in a component i've created. Am i missing something with the CLI config?



ERROR in node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(60,117): error TS2536: Type 'Key' cannot be used to index type 'Object'.
node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(67,109): error TS2536: Type 'Key' cannot be used to index type 'Object'.
node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(76,116): error TS2536: Type 'Key' cannot be used to index type 'Object'.
node_modules/@amcharts/amcharts4/.internal/core/utils/Type.d.ts(25,32): error TS2304: Cannot find name 'Extract'.


my typescript:



import { Component, NgZone } from "@angular/core";
import * as am4core from "@amcharts/amcharts4/core";
import * as am4charts from "@amcharts/amcharts4/charts";
import am4themes_animated from "@amcharts/amcharts4/themes/animated";

am4core.useTheme(am4themes_animated);


@Component({
selector: 'app-am-charts',
templateUrl: './am-charts.component.html',
styleUrls: ['./am-charts.component.css']
})
export class AmChartsComponent {

}









share|improve this question



























    3














    I'm having trouble with compiling my app when including amcharts4. I have simply installed the amcharts4 npm package and am trying to use it in a component i've created. Am i missing something with the CLI config?



    ERROR in node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(60,117): error TS2536: Type 'Key' cannot be used to index type 'Object'.
    node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(67,109): error TS2536: Type 'Key' cannot be used to index type 'Object'.
    node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(76,116): error TS2536: Type 'Key' cannot be used to index type 'Object'.
    node_modules/@amcharts/amcharts4/.internal/core/utils/Type.d.ts(25,32): error TS2304: Cannot find name 'Extract'.


    my typescript:



    import { Component, NgZone } from "@angular/core";
    import * as am4core from "@amcharts/amcharts4/core";
    import * as am4charts from "@amcharts/amcharts4/charts";
    import am4themes_animated from "@amcharts/amcharts4/themes/animated";

    am4core.useTheme(am4themes_animated);


    @Component({
    selector: 'app-am-charts',
    templateUrl: './am-charts.component.html',
    styleUrls: ['./am-charts.component.css']
    })
    export class AmChartsComponent {

    }









    share|improve this question

























      3












      3








      3







      I'm having trouble with compiling my app when including amcharts4. I have simply installed the amcharts4 npm package and am trying to use it in a component i've created. Am i missing something with the CLI config?



      ERROR in node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(60,117): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(67,109): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(76,116): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Type.d.ts(25,32): error TS2304: Cannot find name 'Extract'.


      my typescript:



      import { Component, NgZone } from "@angular/core";
      import * as am4core from "@amcharts/amcharts4/core";
      import * as am4charts from "@amcharts/amcharts4/charts";
      import am4themes_animated from "@amcharts/amcharts4/themes/animated";

      am4core.useTheme(am4themes_animated);


      @Component({
      selector: 'app-am-charts',
      templateUrl: './am-charts.component.html',
      styleUrls: ['./am-charts.component.css']
      })
      export class AmChartsComponent {

      }









      share|improve this question













      I'm having trouble with compiling my app when including amcharts4. I have simply installed the amcharts4 npm package and am trying to use it in a component i've created. Am i missing something with the CLI config?



      ERROR in node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(60,117): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(67,109): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Object.d.ts(76,116): error TS2536: Type 'Key' cannot be used to index type 'Object'.
      node_modules/@amcharts/amcharts4/.internal/core/utils/Type.d.ts(25,32): error TS2304: Cannot find name 'Extract'.


      my typescript:



      import { Component, NgZone } from "@angular/core";
      import * as am4core from "@amcharts/amcharts4/core";
      import * as am4charts from "@amcharts/amcharts4/charts";
      import am4themes_animated from "@amcharts/amcharts4/themes/animated";

      am4core.useTheme(am4themes_animated);


      @Component({
      selector: 'app-am-charts',
      templateUrl: './am-charts.component.html',
      styleUrls: ['./am-charts.component.css']
      })
      export class AmChartsComponent {

      }






      angular amcharts






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 16:18









      user2249567

      265




      265
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Per this issue this newer closed issue and our angular integration documentation, make sure you have the following in your tsconfig.json as AmCharts 4 does not currently support strict mode:



          {
          "compilerOptions": {
          "strictNullChecks": false,
          "strictFunctionTypes": false
          }
          }


          In addition to this, make sure you're at least on TypeScript version 2.7 2.8 but not 3.x as it isn't supported yet.






          share|improve this answer























          • After adding this to tsconfig.json i'm still receiving the same issue
            – user2249567
            Nov 22 '18 at 10:05










          • I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
            – user2249567
            Nov 22 '18 at 10:22






          • 1




            Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
            – xorspark
            Nov 22 '18 at 11:54













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416341%2famcharts4-is-not-compiling-with-angular-6%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Per this issue this newer closed issue and our angular integration documentation, make sure you have the following in your tsconfig.json as AmCharts 4 does not currently support strict mode:



          {
          "compilerOptions": {
          "strictNullChecks": false,
          "strictFunctionTypes": false
          }
          }


          In addition to this, make sure you're at least on TypeScript version 2.7 2.8 but not 3.x as it isn't supported yet.






          share|improve this answer























          • After adding this to tsconfig.json i'm still receiving the same issue
            – user2249567
            Nov 22 '18 at 10:05










          • I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
            – user2249567
            Nov 22 '18 at 10:22






          • 1




            Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
            – xorspark
            Nov 22 '18 at 11:54


















          1














          Per this issue this newer closed issue and our angular integration documentation, make sure you have the following in your tsconfig.json as AmCharts 4 does not currently support strict mode:



          {
          "compilerOptions": {
          "strictNullChecks": false,
          "strictFunctionTypes": false
          }
          }


          In addition to this, make sure you're at least on TypeScript version 2.7 2.8 but not 3.x as it isn't supported yet.






          share|improve this answer























          • After adding this to tsconfig.json i'm still receiving the same issue
            – user2249567
            Nov 22 '18 at 10:05










          • I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
            – user2249567
            Nov 22 '18 at 10:22






          • 1




            Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
            – xorspark
            Nov 22 '18 at 11:54
















          1












          1








          1






          Per this issue this newer closed issue and our angular integration documentation, make sure you have the following in your tsconfig.json as AmCharts 4 does not currently support strict mode:



          {
          "compilerOptions": {
          "strictNullChecks": false,
          "strictFunctionTypes": false
          }
          }


          In addition to this, make sure you're at least on TypeScript version 2.7 2.8 but not 3.x as it isn't supported yet.






          share|improve this answer














          Per this issue this newer closed issue and our angular integration documentation, make sure you have the following in your tsconfig.json as AmCharts 4 does not currently support strict mode:



          {
          "compilerOptions": {
          "strictNullChecks": false,
          "strictFunctionTypes": false
          }
          }


          In addition to this, make sure you're at least on TypeScript version 2.7 2.8 but not 3.x as it isn't supported yet.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 22 '18 at 11:56

























          answered Nov 21 '18 at 16:54









          xorspark

          9,44721025




          9,44721025












          • After adding this to tsconfig.json i'm still receiving the same issue
            – user2249567
            Nov 22 '18 at 10:05










          • I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
            – user2249567
            Nov 22 '18 at 10:22






          • 1




            Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
            – xorspark
            Nov 22 '18 at 11:54




















          • After adding this to tsconfig.json i'm still receiving the same issue
            – user2249567
            Nov 22 '18 at 10:05










          • I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
            – user2249567
            Nov 22 '18 at 10:22






          • 1




            Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
            – xorspark
            Nov 22 '18 at 11:54


















          After adding this to tsconfig.json i'm still receiving the same issue
          – user2249567
          Nov 22 '18 at 10:05




          After adding this to tsconfig.json i'm still receiving the same issue
          – user2249567
          Nov 22 '18 at 10:05












          I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
          – user2249567
          Nov 22 '18 at 10:22




          I've tried setting up a new app up fresh using angular cli v6.1.2 and typescript is on 2.7.2 and im still getting the same issue
          – user2249567
          Nov 22 '18 at 10:22




          1




          1




          Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
          – xorspark
          Nov 22 '18 at 11:54






          Try TypeScript 2.8. I forgot that we bumped our minimum TS requirement from this other issue.
          – xorspark
          Nov 22 '18 at 11:54




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416341%2famcharts4-is-not-compiling-with-angular-6%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          Refactoring coordinates for Minecraft Pi buildings written in Python