Open syami opened 7 years ago
Do you get the same when you npm run watch
?
Have you tried deleting node_modules/ and running npm install
again?
Have you had success building vrview on a different setup?
Thanks @tommytee.
On running watch, it gets stuck here -
root@a286de4b49e9:/vrview# npm run watch
vrview@2.0.1 watch /vrview watchify src/embed/main.js -v -d -o build/embed.js
Error: Cannot find module '../../node_modules/stats-js/build/stats.min' from '/vrview/src/embed' Error: Cannot find module 'es6-promise' from '/vrview/src/embed' Error: Cannot find module 'webvr-polyfill' from '/vrview/src/embed' Error: Cannot find module 'eventemitter3' from '/vrview/src/embed' Error: Cannot find module 'eventemitter3' from '/vrview/src/embed' Error: Cannot find module 'tween.js' from '/vrview/src/embed' Error: Cannot find module 'webvr-boilerplate' from '/vrview/src/embed' Error: Cannot find module 'eventemitter3' from '/vrview/src/embed' Error: Cannot find module 'shaka-player' from '/vrview/src/embed' Error: Cannot find module 'eventemitter3' from '/vrview/src/embed' Error: Cannot find module 'tween.js' from '/vrview/src/embed' Error: Cannot find module 'tween.js' from '/vrview/src/embed'
I have rebuilt on 3 separate docker platforms from scratch - ubuntu 14.04, ubuntu 16.04 and centos. Same problem in all platforms
If I download a fresh copy and npm install watchify
and then npm run watch
I get that exact message. The missing step is npm install
, then watch or build.
Thanks that was the missing step. However now when I run googlevr using npm's http-server, I get a bunch of GET /build/vrview.js" Error (404): "Not found". Any idea what could be the problem here?
You're welcome. 👍 Did you change the directory structure? Are you trying to view the examples?
The examples will look for the player ( vrview.js ) in /build vrview.js will look for the API in /index.html Which will look for three.js and embed.js in the /build folder.
@tommytee I tried using npm based web server, Tomcat and also Google Chrome based Web server. Still not able to see the vrview. I am just able to see this (attached image).
Is there any setting that I am missing?
What is the output in the console?
I don't see any errors in the output
I managed to get through this step by the following:
npm run watch
npm install $module
(NOT install -g
, only install
)Then try npm run build
again
I have the latest nodejs and npm. Fails with this error -
root@a0e7691db11a:/vrview# /usr/local/bin/npm run build
Error: Cannot find module '../../node_modules/stats-js/build/stats.min' from '/vrview/src/embed' at /vrview/node_modules/browser-resolve/node_modules/resolve/lib/async.js:55:21 at load (/vrview/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43) at onex (/vrview/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31) at /vrview/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47 at FSReqWrap.oncomplete (fs.js:114:15) net.js:668 throw new TypeError( ^
TypeError: Invalid data, chunk must be a string or buffer, not object at Socket.write (net.js:668:11) at /usr/lib/node_modules/derequire/bin/cmd.js:33:18 at ConcatStream. (/usr/lib/node_modules/derequire/node_modules/concat-stream/index.js:36:43)
at emitNone (events.js:91:20)
at ConcatStream.emit (events.js:188:7)
at finishMaybe (/usr/lib/node_modules/derequire/node_modules/readable-stream/lib/_stream_writable.js:504:14)
at endWritable (/usr/lib/node_modules/derequire/node_modules/readable-stream/lib/_stream_writable.js:514:3)
at ConcatStream.Writable.end (/usr/lib/node_modules/derequire/node_modules/readable-stream/lib/_stream_writable.js:484:41)
at Socket.onend (_stream_readable.js:513:10)
at Object.onceWrapper (events.js:293:19)
Could not resolve '../../../node_modules/three/src/polyfills.js' from /vrview/src/third_party/three/Three.js Error: Could not resolve '../../../node_modules/three/src/polyfills.js' from /vrview/src/third_party/three/Three.js at /vrview/node_modules/rollup/src/Bundle.js:319:41 at process._tickCallback (internal/process/next_tick.js:109:7) at Module.runMain (module.js:607:11) at run (bootstrap_node.js:427:7) at startup (bootstrap_node.js:151:9) at bootstrap_node.js:542:3 Type rollup --help for help, or visit https://github.com/rollup/rollup/wiki npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vrview@2.0.1 build-three-closure:
rollup -c src/third_party/three/rollup.config.js && java -jar src/third_party/three/closure-compiler-v20160713.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs src/third_party/three/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vrview@2.0.1 build-three-closure script 'rollup -c src/third_party/three/rollup.config.js && java -jar src/third_party/three/closure-compiler-v20160713.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs src/third_party/three/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the vrview package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rollup -c src/third_party/three/rollup.config.js && java -jar src/third_party/three/closure-compiler-v20160713.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs src/third_party/three/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs vrview npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls vrview npm ERR! There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-05-09T03_16_32_549Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vrview@2.0.1 build:
browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vrview@2.0.1 build script 'browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the vrview package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs vrview npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls vrview npm ERR! There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-05-09T03_16_32_580Z-debug.log
This is the complete log - root@a0e7691db11a:/vrview# cat /root/.npm/_logs/2017-05-09T03_14_43_548Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] 2 info using npm@4.5.0 3 info using node@v7.10.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle vrview@2.0.1~prebuild: vrview@2.0.1 6 silly lifecycle vrview@2.0.1~prebuild: no script for prebuild, continuing 7 info lifecycle vrview@2.0.1~build: vrview@2.0.1 8 verbose lifecycle vrview@2.0.1~build: unsafe-perm in lifecycle true 9 verbose lifecycle vrview@2.0.1~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/vrview/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 10 verbose lifecycle vrview@2.0.1~build: CWD: /vrview 11 silly lifecycle vrview@2.0.1~build: Args: [ '-c', 11 silly lifecycle 'browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure' ] 12 silly lifecycle vrview@2.0.1~build: Returned: code: 1 signal: null 13 info lifecycle vrview@2.0.1~build: Failed to exec build script 14 verbose stack Error: vrview@2.0.1 build: (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid vrview@2.0.1
16 verbose cwd /vrview
17 verbose Linux 4.4.57-boot2docker
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
19 verbose node v7.10.0
20 verbose npm v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error vrview@2.0.1 build:
browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure
14 verbose stack Exit status 1 14 verbose stack at EventEmitter.browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure
23 error Exit status 1 24 error Failed at the vrview@2.0.1 build script 'browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure'. 24 error Make sure you have the latest version of node.js and npm installed. 24 error If you do, this is most likely a problem with the vrview package, 24 error not with npm itself. 24 error Tell the author that this fails on your system: 24 error browserify src/embed/with-analytics.js | derequire | uglifyjs -c > build/embed.min.js && npm run build-three-closure 24 error You can get information on how to open an issue for this project with: 24 error npm bugs vrview 24 error Or if that isn't available, you can get their info via: 24 error npm owner ls vrview 24 error There is likely additional logging output above. 25 verbose exit [ 1, true ]