title: react-leaflet-rotatedmarkers: TypeError: Super expression must either be null or a function, not object
body: <p>as you can see in the topic is my problem that when i want to import react-leaflet-rotatedmarker, only importing, my react webapplication throws me this message.</p>
  
  <p>I'm using react-leaflet v2.1.2.</p>
  
  <p>Here is a snippet of my js code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react';
  import { Map, TileLayer, Marker, Popup } from 'react-leaflet';
  import L, { map, addTo } from 'leaflet';
  import RotatedMarker from 'react-leaflet-rotatedmarker'
  import './App.css'
  
  //importing marker/icon
  var ego_veh_icon = L.icon({
      iconUrl: require('./design/icons/ego_veh_arrow.svg'),
      iconSize: [150, 200],
      iconAnchor: [82.5, 40],
      popupAnchor: [0, -25],
  });
  
  var av_veh_icon = L.icon({
      iconUrl: require('./design/icons/autonom_veh_arrow.svg'),
      iconSize: [150, 200],
      iconAnchor: [82.5,55],
      popupAnchor: [-5, -25],
  });
  
  var nav_veh_icon = L.icon({
      iconUrl: require('./design/icons/non_autonom_veh_arrow.svg'),
      iconSize: [150, 200],
      iconAnchor: [82.5, 60],
      popupAnchor: [-10, -25],
  });
  
  class Map_hmi extends Component {
      constructor() {
          super();
          this.state = {
              markers: [[x, y]],
              param: null,
          };
      }
  
      // ego veh position 
      ego_veh = {
          lat: x,
          lng: y,
      }
  
       // nav veh position 
       nav_veh = {
          lat: x,
          lng: y,
      }
  
       // av veh1 position 
       av_veh1 = {
          lat: x,
          lng: y,
      }
  
      // av veh2 position 
      av_veh2 = {
          lat: x
          lng: y,
      }
  
      render() {
          
          const ego_veh_pos = [this.ego_veh.lat, this.ego_veh.lng]
          const nav_veh_pos = [this.nav_veh.lat, this.nav_veh.lng]
          const av_veh1_pos = [this.av_veh1.lat, this.av_veh1.lng]
          const av_veh2_pos = [this.av_veh2.lat, this.av_veh2.lng]
          return (
              // declaring the map
              &lt;Map
                  className="map"
                  center={ego_veh_pos}
                  zoom={15}
                  zoomControl={false}
              &gt;
                  &lt;TileLayer
                      attribution='&amp;amp;copy &lt;a href="http://osm.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors'
                      url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
                  /&gt;  
                      {/* &lt;RotatedMarker position={position} rotationAngle={180} rotationOrigin={'center'} /&gt; */}
                      {/* ego veh */}
                      &lt;Marker 
                          position={ego_veh_pos}
                          icon= {ego_veh_icon}&gt;
                          &lt;Popup&gt;
                          EGO &lt;br/&gt;
                          &lt;/Popup&gt;
                      &lt;/Marker&gt;
                      {/* nav veh */}
                      &lt;Marker 
                          position={nav_veh_pos}
                          icon= {nav_veh_icon}&gt;
                          &lt;Popup&gt;
                          NAV &lt;br/&gt;
                          &lt;/Popup&gt;
                      &lt;/Marker&gt;
                      {/* av veh1 */}
                      &lt;Marker 
                          position={av_veh1_pos}
                          icon= {av_veh_icon}&gt;
                          &lt;Popup&gt;
                          AV &lt;br/&gt;
                          &lt;/Popup&gt;
                      &lt;/Marker&gt;
                       {/* av veh2 */}
                       &lt;Marker 
                          position={av_veh2_pos}
                          icon= {av_veh_icon}&gt;
                          &lt;Popup&gt;
                          AV &lt;br/&gt;
                          &lt;/Popup&gt;
                      &lt;/Marker&gt;
                  )}
              &lt;/Map&gt;
              
          );
      }
  }
  
  export default Map_hmi;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So my code works fine without the import, but as soon as I import it:</p>
  
  <blockquote>
    <blockquote>
      <p>TypeError: Super expression must either be null or a function, not object</p>
    </blockquote>
  </blockquote>
  
  <p>I only want to rotate the icon ....</p>
  
  <p>Any help?</p>
  
  <p>Greetings</p>