title: Error: Can't resolve 'TweenMax' while using Angular CLI with ScrollMagic and GSAP
body: <p>I'm trying to integrate Scrollmagic plugin with Angular CLI. However, I'm getting this error: </p>
  
  <blockquote>
    <p>./~/ScrollMagic/scrollmagic/minified/plugins/animation.gsap.min.js
    Module not found: Error: Can't resolve 'TweenMax' in
    '/Users/../project/node_modules/ScrollMagic/scrollmagic/minified/plugins'</p>
  </blockquote>
  
  <p>I have installed GSAP and scrollmagic library using npm:</p>
  
  <pre><code>npm install gsap
  npm install scrollmagic
  </code></pre>
  
  <p><strong>.angular-cli.json</strong></p>
  
  <pre><code>"scripts": [
          "../node_modules/gsap/src/uncompressed/TweenMax.js",
          "../node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js",
          "../node_modules/scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js",
          "../node_modules/scrollmagic/scrollmagic/minified/plugins/debug.addIndicators.min.js"
        ],
  </code></pre>
  
  <p><strong>Component</strong></p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { TweenMax, TimelineMax } from "gsap";
  import * as ScrollMagic from 'ScrollMagic';
  import "ScrollMagic/scrollmagic/minified/plugins/debug.addIndicators.min.js";
  import "ScrollMagic/scrollmagic/minified/plugins/animation.gsap.min.js";
  
  
  @Component({
    selector: 'app-floating-butterfly',
    templateUrl: './floating-butterfly.component.html',
    styleUrls: ['./floating-butterfly.component.scss']
  })
  export class FloatingButterflyComponent implements OnInit {
  
    constructor() { }
  
    ngOnInit() {
      var controller = new ScrollMagic.Controller();
      var scene = new ScrollMagic.Scene({
        triggerElement: ".floating-butterfly"
      })
      .setTween(".floating-butterfly", 0.5, {backgroundColor: "green", scale: 2.5}) // trigger a TweenMax.to tween
      .addIndicators({name: "1 (duration: 0)"}) // add indicators (requires plugin)
      .addTo(controller);
  
  
    }
  }
  </code></pre>