cruise-automation / webviz

web-based visualization libraries
https://webviz.io/
Apache License 2.0
2.07k stars 413 forks source link

npm run build error #350

Closed heshiwen1989 closed 4 years ago

heshiwen1989 commented 4 years ago

Hi, webRiv Teams: when i follow git readme to use this project, i get error, e.g. ERROR in ./packages/webviz-core/src/components/Modal.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/xxx/Downloads/webviz-master/packages/webviz-core/src/components' @ ./packages/webviz-core/src/components/Modal.js 12:47-76 @ ./packages/webviz-core/src/components/ShareJsonModal.js @ ./packages/webviz-core/src/components/PanelToolbar/index.js @ ./packages/webviz-core/src/panels/diagnostics/DiagnosticSummary.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

chengtz commented 4 years ago

老师,他这个不能直接npm install来安装所有依赖,他在readme中说了Please see the individual package READMEs for details on how to install and use them. 请查看这些支持包自己的readme来安装部分依赖和使用

jtbandes commented 4 years ago

Hello, did you try running npm run bootstrap first? Can you please share the full console log including the commands you ran?

heshiwen1989 commented 4 years ago

Hello, did you try running npm run bootstrap first? Can you please share the full console log including the commands you ran?

My Step is: Step1: nmp run bootstrap, but install node-sass get some error, and then i install node-sass independently by command: nmp install node-sass --save, finally run nmp run booststrap again no any error; Step2: nmp run build , and get error: hsw@hsw-ThinkPad-E460:~/Downloads/webviz-master$ npm run build

root@ build /home/hsw/Downloads/webviz-master lerna run build && webpack

lerna notice cli v3.6.0 lerna info Executing command in 5 packages: "npm run build" lerna info run Ran npm script 'build' in '@cruise-automation/rpc' in 2.4s:

@cruise-automation/rpc@0.0.2 build /home/hsw/Downloads/webviz-master/packages/@cruise-automation/rpc NODE_ENV=production npm run build-dev && flow-copy-source -v src lib --ignore '.test.'

@cruise-automation/rpc@0.0.2 build-dev /home/hsw/Downloads/webviz-master/packages/@cruise-automation/rpc BABEL_ENV=$NODE_ENV babel src/index.js --out-dir lib --copy-files --config-file ../../../babel.config.js

Successfully compiled 1 file with Babel. src/index.js -> lib/index.js.flow lerna info run Ran npm script 'build' in '@cruise-automation/button' in 2.7s:

@cruise-automation/button@0.0.7 build /home/hsw/Downloads/webviz-master/packages/@cruise-automation/button NODE_ENV=production npm run build-dev && flow-copy-source -v src lib --ignore '.test.'

@cruise-automation/button@0.0.7 build-dev /home/hsw/Downloads/webviz-master/packages/@cruise-automation/button BABEL_ENV=$NODE_ENV babel src/index.js --out-dir lib --copy-files --config-file ../../../babel.config.js

Successfully compiled 1 file with Babel. src/index.js -> lib/index.js.flow lerna info run Ran npm script 'build' in '@cruise-automation/hooks' in 3.2s:

@cruise-automation/hooks@0.0.1 build /home/hsw/Downloads/webviz-master/packages/@cruise-automation/hooks rollup -c

lerna info run Ran npm script 'build' in '@cruise-automation/tooltip' in 2.2s:

@cruise-automation/tooltip@0.0.7 build /home/hsw/Downloads/webviz-master/packages/@cruise-automation/tooltip NODE_ENV=production npm run build-dev && flow-copy-source -v src lib --ignore '.test.'

@cruise-automation/tooltip@0.0.7 build-dev /home/hsw/Downloads/webviz-master/packages/@cruise-automation/tooltip BABEL_ENV=$NODE_ENV babel src/index.js --out-dir lib --copy-files --config-file ../../../babel.config.js

Successfully compiled 1 file with Babel. src/index.js -> lib/index.js.flow lerna info run Ran npm script 'build' in 'regl-worldview' in 19.9s:

regl-worldview@0.4.0 build /home/hsw/Downloads/webviz-master/packages/regl-worldview rollup -c

lerna success run Ran npm script 'build' in 5 packages in 19.9s: lerna success - regl-worldview lerna success - @cruise-automation/button lerna success - @cruise-automation/hooks lerna success - @cruise-automation/rpc lerna success - @cruise-automation/tooltip Browserslist: caniuse-lite is outdated. Please run next command npm update caniuse-lite browserslist Hash: a0def8f42bf2840e0668 Version: webpack 4.27.1 Time: 31653ms Built at: 03/08/2020 10:55:49 AM Asset Size Chunks Chunk Names 0.js 25.1 KiB 0 [emitted]
09517e8c28a52c2dcbfd.worker.js 60 KiB [emitted]
1.js 390 KiB 1 [emitted] [big]
10.js 17.8 KiB 10 [emitted]
11.js 20.3 KiB 11 [emitted]
12.js 6.95 KiB 12 [emitted]
13.js 18.7 KiB 13 [emitted]
14.js 10.9 KiB 14 [emitted]
15.js 14.5 KiB 15 [emitted]
16.js 15.2 KiB 16 [emitted]
17.js 12.4 KiB 17 [emitted]
18.js 24.7 KiB 18 [emitted]
19.js 19.7 KiB 19 [emitted]
2.js 215 KiB 2 [emitted]
20.js 7.03 KiB 20 [emitted]
21.js 15 KiB 21 [emitted]
22.js 15.3 KiB 22 [emitted]
23.js 16.3 KiB 23 [emitted]
24.js 11.7 KiB 24 [emitted]
25.js 18.1 KiB 25 [emitted]
26.js 19.2 KiB 26 [emitted]
27.js 49.6 KiB 27 [emitted]
28.js 13.6 KiB 28 [emitted]
29.js 14.3 KiB 29 [emitted]
3.js 214 KiB 3 [emitted]
30.js 42.7 KiB 30 [emitted]
31.js 59 KiB 31 [emitted]
32.js 32.2 KiB 32 [emitted]
33.js 49.5 KiB 33 [emitted]
33abf9e056d05800b2dc833ae371d9a2.glb 480 KiB [emitted] [big]
34.js 72.1 KiB 34 [emitted]
35.js 17.7 KiB 35 [emitted]
36.js 24.2 KiB 36 [emitted]
37.js 17.7 KiB 37 [emitted]
38.js 16.3 KiB 38 [emitted]
39.js 33.4 KiB 39 [emitted]
4.js 96.6 KiB 4 [emitted]
40.js 15.6 KiB 40 [emitted]
41.js 40.8 KiB 41 [emitted]
42.js 45.5 KiB 42 [emitted]
43.js 17 KiB 43 [emitted]
44.js 10.1 KiB 44 [emitted]
45.js 9.55 KiB 45 [emitted]
46.js 26.2 KiB 46 [emitted]
47.js 15.7 KiB 47 [emitted]
48.js 53.7 KiB 48 [emitted]
49.js 80 KiB 49 [emitted]
5.js 28.6 KiB 5 [emitted]
50.js 26.4 KiB 50 [emitted]
51.js 17 KiB 51 [emitted]
52.js 15.3 KiB 52 [emitted]
53.js 22.5 KiB 53 [emitted]
54.js 21.8 KiB 54 [emitted]
55.js 9.53 KiB 55 [emitted]
56.js 18.1 KiB 56 [emitted]
6.js 21.4 KiB 6 [emitted]
6a934943c1d8e69a6799d947c1987ac2.glb 668 KiB [emitted] [big]
6e5b2c3eb9c69868522ad591241d4746.png 13.3 KiB [emitted]
7.js 6.05 KiB 7 [emitted]
8.js 10 KiB 8 [emitted]
9.js 47.8 KiB 9 [emitted]
ImageCanvas.worker.js?3145c4e76fa2c088e0d1 250 KiB [emitted] [big]
WorkerDataProvider.worker.js?061f6a2bb50bd637ff1e 6.26 MiB [emitted] [big]
cf6b1c5e0b67500c2719e8c47b0e0493.glb 118 KiB [emitted]
docs.js 12.8 MiB docs [emitted] [big] docs editor.worker.js 915 KiB [emitted] [big]
fafbf116a737e1497143.worker.js 21.3 MiB [emitted] [big]
node-playground-editor.js 642 KiB node-playground-editor [emitted] [big] node-playground-editor typescript.worker.js 20.5 MiB [emitted] [big]
vendors~node-playground-editor.js 16.7 MiB vendors~node-playground-editor [emitted] [big] vendors~node-playground-editor wasm-lz4-1024db00c0ef0bd53ddde582fdece700.wasm 20.6 KiB [emitted]
webvizCoreBundle.js 32.2 MiB webvizCoreBundle [emitted] [big] webvizCoreBundle Entrypoint docs [big] = docs.js Entrypoint webvizCoreBundle [big] = webvizCoreBundle.js [0] multi ./docs/src/index.js webpack-hot-middleware/client 40 bytes {docs} [built] [./docs/src/App.js] 4.52 KiB {docs} [built] [./docs/src/index.js] 753 bytes {docs} [built] [./docs/src/styles/App.css] 1.3 KiB {docs} [built] [./docs/src/styles/markdown.css] 1.32 KiB {docs} [built] [./docs/src/styles/prism.css] 1.31 KiB {docs} [built] [./node_modules/webpack-hot-middleware/client-overlay.js] (webpack)-hot-middleware/client-overlay.js 2.16 KiB {docs} [built] [./node_modules/webpack-hot-middleware/client.js] (webpack)-hot-middleware/client.js 7.59 KiB {docs} [built] [./node_modules/webpack-hot-middleware/process-update.js] (webpack)-hot-middleware/process-update.js 4.26 KiB {docs} [built] [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {docs} {webvizCoreBundle} [built] [./packages/webviz-core/src/dataProviders/WorkerDataProvider.worker.js] 132 bytes {webvizCoreBundle} [not cacheable] [built] [./packages/webviz-core/src/index.js] 366 bytes {webvizCoreBundle} [built] [./packages/webviz-core/src/loadWebviz.js] 11.9 KiB {webvizCoreBundle} [built] [./packages/webviz-core/src/panels/GlobalVariables/index.js] 9.45 KiB {webvizCoreBundle} [built] [./packages/webviz-core/src/panels/ImageView/index.js] 16.5 KiB {webvizCoreBundle} [built]

ERROR in ./packages/webviz-core/src/components/Modal.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/components' @ ./packages/webviz-core/src/components/Modal.js 12:47-76 @ ./packages/webviz-core/src/components/ExperimentalFeatures.js @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/World.js @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/TopicGroups/LayoutForTopicGroups.js @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/index.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

ERROR in ./packages/webviz-core/src/components/Panel.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/components' @ ./packages/webviz-core/src/components/Panel.js 25:47-76 @ ./packages/webviz-core/src/panels/diagnostics/DiagnosticSummary.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

ERROR in ./packages/webviz-core/src/components/PlaybackControls/index.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/components/PlaybackControls' @ ./packages/webviz-core/src/components/PlaybackControls/index.js 20:47-76 @ ./packages/webviz-core/src/components/Root.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

ERROR in ./packages/webviz-core/src/panels/ImageView/ImageCanvas.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/panels/ImageView' @ ./packages/webviz-core/src/panels/ImageView/ImageCanvas.js 20:47-76 @ ./packages/webviz-core/src/panels/ImageView/index.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

ERROR in ./packages/webviz-core/src/panels/ThreeDimensionalViz/Layout.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/panels/ThreeDimensionalViz' @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/Layout.js 16:47-76 @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/index.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js

ERROR in ./packages/webviz-core/src/panels/ThreeDimensionalViz/TopicGroups/LayoutForTopicGroups.js Module not found: Error: Can't resolve 'react-key-listener' in '/home/hsw/Downloads/webviz-master/packages/webviz-core/src/panels/ThreeDimensionalViz/TopicGroups' @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/TopicGroups/LayoutForTopicGroups.js 14:47-76 @ ./packages/webviz-core/src/panels/ThreeDimensionalViz/index.js @ ./packages/webviz-core/src/loadWebviz.js @ ./packages/webviz-core/src/index.js Child vs/editor/editor: Asset Size Chunks Chunk Names editor.worker.js 915 KiB main [emitted] [big] main Entrypoint main = editor.worker.js [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {main} [built]

npm ERR! A complete log of this run can be found in:

heshiwen1989 commented 4 years ago

Hello, My Solution for this issue: Use npm install react-key-listener directly(by: npm install react-key-listener --save), and Then No Any Error, Thanks!

chengtz commented 4 years ago

何老师,我装了好久也没装起来 这个东西错误是真的多 老师可以给个联系方式吗,安装好的话,可以打包下docker吗

chengtz commented 4 years ago

找到了 docker pull johannhaselberger/webviz 不过是六个月前的 何老师你npm安装好了没? 安装好能留个联系方式吗

heshiwen1989 commented 4 years ago

找到了 docker pull johannhaselberger/webviz 不过是六个月前的 何老师你npm安装好了没? 安装好能留个联系方式吗

我是直接git下载这个工程,然后按照 npm run bootstrap,如果报错,就通过npm install 出错模块 --save 单独安装出错的模块, 然后 npm run build, 我遇到的是找不到模块react-key-listener, 我就通过npm 直接安装这个模块,再次npm run build 就ok了

chengtz commented 4 years ago

老师。我刚才一分钟就安装好了,用的是docker,别人已经装好的依赖

https://hub.docker.com/r/johannhaselberger/webviz

直接用docker映射8080就可以直接使用了,你可以保存一下,可以给个联系方式吗,我是南京金陵科技学院的学生,有ROS方面的问题可以请教请教

chengtz commented 4 years ago

手动也装好了,给家里服务器连到路由器装了个翻墙软件

heshiwen1989 commented 4 years ago

手动也装好了,给家里服务器连到路由器装了个翻墙软件

你可能是网络不好也有可能,npm比较慢可能会有一些失败;你打算用这个做什么

chengtz commented 4 years ago

毕业设计就是设计ROS小车,弄个可视化的界面再加上自己新增的一些传感器话题发布,到时候导师就很容易通过了

vidaaudrey commented 4 years ago

@chengtz 除了react-key-listener, 你还发现了什么错误呢? 我刚刚重新在本地安装了一遍没发现什么问题:git clone... => npm run bootstrap => npm run build => npm run docs.

另外你能告诉我你的 npm, node 的版本吗?我的是 npm(6.13.4), node (v10.15.3). 你用的是什么操作系统呢?