aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.61k stars 3.94k forks source link

Implementing A-Frame via NPM on NextJS generates a error. #4183

Open a-barbieri opened 5 years ago

a-barbieri commented 5 years ago

Description:

Implementing A-Frame via NPM on a NextJS application generates the following error:

TypeError: systems[name] is not a constructor

It doesn't generate any issue adding it via <script> tag.

It's certainly something due to the way NextJS requires the library, so I wonder what can be done to make the NPM compatible.

You can reproduce the error by using the using-npm branch of the example. See the README for more information.

antoninklopp commented 4 years ago

Hi,

I am still experiencing a similar issue on the latest version of Aframe. Is there a solution?

Thanks

arpu commented 4 years ago

i only saw this problem on this brnach https://github.com/aframevr/aframe/pull/4167

antoninklopp commented 4 years ago

Hi @arpu, I am actually having this on the latest release of Aframe. Do you know what caused the problem in #4167 and when will this branch be merged since it seems very interesting? Thanks !

arpu commented 4 years ago

sorry no idea best waiting for @dmarcos and @ngokevin

dmarcos commented 4 years ago

https://github.com/aframevr/aframe/pull/4167 is not a priority at the moment. A-Frame 1.0.4 should be fully compliant with all browsers. Not sure what’s special about next.js. Someone has to educate.