4
votes

I have an aframe project that has been part of a React app and working fine.

Because of various issues I'm trying to seperate the layers

I've added the aframe scene directly into the HTML document

  <body>
      <div id="root" style="height: 100%; width: 100%">

      </div>

      <a-scene>
      </a-scene> 

  </body>

The React part is rendering fine, but AFRAME is crashing with

TypeError: systems[name] is not a constructor

from

 this.systems[name] = new systems[name](this);
 this.systemNames.push(name);

The aframe library is imported via Webpack.

Any ideas what could cause this?

1

1 Answers

0
votes

I had the same problem today. I was using Cloudflare with Rocket Loader. That’s why it wasn’t working. Once I disabled it, it worked fine.