borismus / webvr-boilerplate

A starting point for web-based VR experiences that work on all VR headsets.
Apache License 2.0
1.8k stars 451 forks source link

Missing dependencies when used from NPM #155

Open mflux opened 8 years ago

mflux commented 8 years ago

Here are my steps to get the demos running:

npm install webvr-boilerplate
cd node_modules/
cd webvr-boilerplate/
python -m SimpleHTTPServer 

I assume there's no build? there's no grunt/gulp, absolutely nothing in readme.md that hints at building.

In chrome, errors:

GET http://localhost:8000/node_modules/es6-promise/dist/es6-promise.js (index):73 GET http://localhost:8000/node_modules/three/three.js (index):78 GET http://localhost:8000/node_modules/three/examples/js/controls/VRControls.js (index):83 GET http://localhost:8000/node_modules/three/examples/js/effects/VREffect.js (index):99 Uncaught ReferenceError: THREE is not defined(…)

Alright so THREE is missing and some other things. I go back into the index.html folder and

npm install

watchify@3.7.0 node_modules\watchify
browserify@13.1.0 node_modules\browserify
derequire@2.0.3 node_modules\derequire

GET http://localhost:8000/node_modules/es6-promise/dist/es6-promise.js (index):73 GET http://localhost:8000/node_modules/three/three.js (index):78 GET http://localhost:8000/node_modules/three/examples/js/controls/VRControls.js (index):83 GET http://localhost:8000/node_modules/three/examples/js/effects/VREffect.js (index):99 Uncaught ReferenceError: THREE is not defined(…)

Same errors. Still missing THREE.

npm install --save three

GET http://localhost:8000/node_modules/es6-promise/dist/es6-promise.js (index):73 GET http://localhost:8000/node_modules/three/three.js VRControls.js:6 Uncaught ReferenceError: THREE is not defined(…)(anonymous function) @ VRControls.js:6 VREffect.js:12 Uncaught ReferenceError: THREE is not defined(…)(anonymous function) @ VREffect.js:12 (index):99 Uncaught ReferenceError: THREE is not defined(…)

Module issues.

I'm missing something obvious that's undocumented. Please help?

borismus commented 8 years ago

Hi Michael, there actually is a build step. You can run npm build. Although the build is checked in, as are all of the node dependencies.