supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.
https://ngokevin.github.io/aframe-react-boilerplate/
MIT License
1.42k stars 151 forks source link

TypeError: setting getter-only property "document" aframe-master.js:62727 #104

Closed chicarrida closed 7 years ago

chicarrida commented 7 years ago

I have a project using React, Bootstrap, THREEJS, Apollo, react-proxy-loader and webpack. I want to replace manually written THREEJS code with aframe-react. Adding the simple aframe component from the example I get the above error.

Looking into aframe-master.js I find this:

(function (global){ // This is the entry point if requiring/importing via node, or // a build tool that uses package.json entry (like browserify, webpack). // If running in node with a window mock available, globalize its members // if needed. Otherwise, just continue to./main if (typeof global !== 'undefined' && global.window) { global.document = global.window.document; global.navigator = global.window.navigator; }

So it seems, global.document can not be accessed. I tried commenting out everything THREE related, Apollo provider and the proxy stuff - still no luck. Any ideas??

chicarrida commented 7 years ago

This seems to be an aframe-related issue as it also appears when using aframe directly without aframe-react... Therefore closing this.