开源改变世界!!

在 Linux 上构建失败 #516

推推 grbl 2年前 (2023-02-04) 130次浏览
关闭
FabriceSalvaire 打开了这个问题 2018 年 9 月 27 日 · 3条评论
关闭

在 Linux 上构建失败#516

FabriceSalvaire 打开了这个问题 2018 年 9 月 27 日 · 3条评论

评论

在 Linux 上构建失败 #516

我们想在 Windows 上为我们的黑客空间重建 LaserWeb,但我无法在 Linux(以及 Windows)上重建它

npm 开始

     ERROR in ./src/lib/cam.js
     Module not found: Error: Can't resolve 'web-cam-cpp' in '/home/scratch/sources/LaserWeb4/src/lib'
     @ ./src/lib/cam.js 41:0-36
     @ ./src/lib/cam-gcode-laser-cut.js
     @ ./~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./src/lib/workers/cam-lasercut.js

npm 运行捆绑产品

    > laserweb@4.0.996 bundle-prod /home/scratch/sources/LaserWeb4
    > webpack -p --progress --colors

    Hash: ed9bbd65ce415149d18e
    Version: webpack 2.7.0
    Time: 26262ms
    Asset Size Chunks Chunk Names
    674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted]
    d5763a38783660196107.worker.js 40 kB [emitted]
    93e338c2b30397c0b153.worker.js 621 kB [emitted] [big]
    93e338c2b30397c0b153.worker.js.map 761 kB [emitted]
    21421bab63cc19998d92.worker.js 1.48 MB [emitted] [big]
    21421bab63cc19998d92.worker.js.map 1.91 MB [emitted]
    3f0fa5d448bae9d3631c.worker.js 320 kB [emitted] [big]
    3f0fa5d448bae9d3631c.worker.js.map 412 kB [emitted]
    6465bc71fed0a3f02b80.worker.js 1.73 MB [emitted] [big]
    6465bc71fed0a3f02b80.worker.js.map 2.21 MB [emitted]
    f4769f9bdb7466be65088239c12046d1.eot 20.1 kB [emitted]
    d5763a38783660196107.worker.js.map 50.9 kB [emitted]
    fa2772327f55d8198301fdb8bcfc8158.woff 23.4 kB [emitted]
    448c34a56d699c29117adc64c43affeb.woff2 18 kB [emitted]
    af7ae505a9eed503f8b8e6982036873e.woff2 77.2 kB [emitted]
    fee66e712a8a08eef5805a46892932ad.woff 98 kB [emitted]
    e18bbf611f2a2e43afc071aa2f4e1512.ttf 45.4 kB [emitted]
    b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted]
    89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
    912ec66d7572ff821749319396470bde.svg 444 kB [emitted] [big]
    index.js 9.42 MB 0 [emitted] [big] main
    index.js.map 11.6 MB 0 [emitted] main
    [0] ../~/react/react.js 56 bytes {0} [built]
    [12] ../~/react-dom/index.js 59 bytes {0} [built]
    [70] ./index.js 4.92 kB {0} [built]
    [544] ../~/babel-polyfill/lib/index.js 833 bytes {0} [built]
    [545] ../~/webpack-dev-server/client?http://0.0.0.0:8080 7.93 kB {0} [built]
    [546] ../~/webpack/hot/only-dev-server.js 2.29 kB {0} [built]
    [625] ../~/babel-polyfill/~/regenerator-runtime/runtime.js 24.4 kB {0} [built]
    [676] ../~/core-js/fn/regexp/escape.js 108 bytes {0} [built]
    [917] ../~/core-js/shim.js 8.18 kB {0} [built]
    [1232] ../~/redux-logger/dist/redux-logger.js 10.5 kB {0} [built]
    [1261] ../~/strip-ansi/index.js 161 bytes {0} [built]
    [1305] ../~/webpack-dev-server/client/overlay.js 3.67 kB {0} [built]
    [1308] ../~/webpack/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
    [1309] ../~/webpack/hot/log-apply-result.js 1.02 kB {0} [built]
    [1344] multi webpack-dev-server/client?http://0.0.0.0:8080 webpack/hot/only-dev-server babel-polyfill ./index.js 64 bytes {0} [built]
    + 1330 hidden modules

    ERROR in index.js from UglifyJs
    Unexpected token: name (Icon) [./components/font-awesome.js:15,6][index.js:12324,4]
    Child worker:
    Asset Size Chunks Chunk Names
    d5763a38783660196107.worker.js 40 kB 0 [emitted] main
    d5763a38783660196107.worker.js.map 50.9 kB 0 [emitted] main
    [0] ./lib/cam-gcode-lathe.js 11.5 kB {0} [built]
    [1] ../~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./lib/workers/cam-lathe.js 1.42 kB {0} [built]

    ERROR in d5763a38783660196107.worker.js from UglifyJs
    Unexpected token: name (GcodeGenerator) [./lib/cam-gcode-lathe.js:18,6][d5763a38783660196107.worker.js:737,4]
    Child worker:
    Asset Size Chunks Chunk Names
    93e338c2b30397c0b153.worker.js 621 kB 0 [emitted] [big] main
    93e338c2b30397c0b153.worker.js.map 761 kB 0 [emitted] main
    [0] ../~/poly2tri/src/xy.js 3.07 kB {0} [built]
    [1] ../~/snapsvg/dist/snap.svg.js 282 kB {0} [built]
    [2] ../~/poly2tri/src/advancingfront.js 4.04 kB {0} [built]
    [3] ../~/poly2tri/src/pointerror.js 1.2 kB {0} [built]
    [4] ../~/poly2tri/src/triangle.js 16.1 kB {0} [built]
    [5] ./lib/mesh.js 20.9 kB {0} [built]
    [6] ../~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./lib/workers/cam-preflight.js 3.02 kB {0} [built]
    [7] ../~/clipper-lib/clipper.js 211 kB {0} [built]
    [8] ../~/poly2tri/src/assert.js 766 bytes {0} [built]
    [9] ../~/poly2tri/src/point.js 6.98 kB {0} [built]
    [10] ../~/poly2tri/src/sweep.js 25.6 kB {0} [built]
    [11] ../~/poly2tri/src/sweepcontext.js 14.8 kB {0} [built]
    [12] ../~/poly2tri/src/utils.js 2.55 kB {0} [built]

    ERROR in 93e338c2b30397c0b153.worker.js from UglifyJs
    Unexpected token: name (numSegments) [./lib/mesh.js:39,8][93e338c2b30397c0b153.worker.js:10346,8]
    Child worker:
    Asset Size Chunks Chunk Names
    21421bab63cc19998d92.worker.js 1.48 MB 0 [emitted] [big] main
    21421bab63cc19998d92.worker.js.map 1.91 MB 0 [emitted] main
    [2] ./lib/mesh.js 20.9 kB {0} [built]
    [3] ../~/clipper-lib/clipper.js 211 kB {0} [built]
    [7] ../~/gl-matrix/lib/gl-matrix/vec3.js 19.3 kB {0} [built]
    [8] ../~/gl-matrix/lib/gl-matrix/vec4.js 14.7 kB {0} [built]
    [9] ../~/snapsvg/dist/snap.svg.js 282 kB {0} [built]
    [11] ../~/poly2tri/src/pointerror.js 1.2 kB {0} [built]
    [12] ../~/poly2tri/src/triangle.js 16.1 kB {0} [built]
    [13] ./lib/cam-gcode-mill.js 12.5 kB {0} [built]
    [14] ./lib/cam.js 16 kB {0} [built]
    [15] ../~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./lib/workers/cam-mill.js 1.41 kB {0} [built]
    [16] ../~/gl-matrix/lib/gl-matrix.js 548 bytes {0} [built]
    [19] ../~/gl-matrix/lib/gl-matrix/quat2.js 22.6 kB {0} [built]
    [24] ../~/poly2tri/src/sweepcontext.js 14.8 kB {0} [built]
    [27] ../~/script-loader/addScript.js 642 bytes {0} [built]
    [28] ../~/script-loader!../~/web-cam-cpp/web-cam-cpp.js 235 bytes {0} [built]
    + 14 hidden modules

    ERROR in 21421bab63cc19998d92.worker.js from UglifyJs
    Unexpected token: name (numSegments) [./lib/mesh.js:39,8][21421bab63cc19998d92.worker.js:947,8]
    Child worker:
    Asset Size Chunks Chunk Names
    3f0fa5d448bae9d3631c.worker.js 320 kB 0 [emitted] [big] main
    3f0fa5d448bae9d3631c.worker.js.map 412 kB 0 [emitted] main
    [0] ./lib/action2gcode/generators/abstract-generator.js 1.61 kB {0} [built]
    [1] ./lib/lw.raster2gcode/raster-to-gcode.js 29.7 kB {0} [built]
    [2] ./lib/action2gcode/gcode-generator.js 974 bytes {0} [built]
    [3] ./lib/action2gcode/generators/default-generator.js 2.38 kB {0} [built]
    [4] ./lib/action2gcode/generators/marlin-generator.js 2.75 kB {0} [built]
    [5] ./lib/lw.raster2gcode/canvas-filters.js 7.41 kB {0} [built]
    [6] ./lib/lw.raster2gcode/canvas-grid.js 8.54 kB {0} [built]
    [7] ../~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./lib/workers/cam-raster.js 1.32 kB {0} [built]
    [8] ../~/floyd-steinberg/floyd-steinberg.js 1.86 kB {0} [built]
    [10] ../~/xregexp/lib/addons/matchrecursive.js 7.12 kB {0} [built]
    [11] ../~/xregexp/lib/addons/unicode-base.js 9.62 kB {0} [built]
    [12] ../~/xregexp/lib/addons/unicode-blocks.js 999 bytes {0} [built]
    [13] ../~/xregexp/lib/addons/unicode-categories.js 1.1 kB {0} [built]
    [14] ../~/xregexp/lib/addons/unicode-properties.js 2.74 kB {0} [built]
    [16] ../~/xregexp/lib/index.js 1.26 kB {0} [built]
    + 7 hidden modules

    ERROR in 3f0fa5d448bae9d3631c.worker.js from UglifyJs
    Unexpected token: name (AbstractGenerator) [./lib/action2gcode/generators/abstract-generator.js:4,6][3f0fa5d448bae9d3631c.worker.js:727,4]
    Child worker:
    Asset Size Chunks Chunk Names
    6465bc71fed0a3f02b80.worker.js 1.73 MB 0 [emitted] [big] main
    6465bc71fed0a3f02b80.worker.js.map 2.21 MB 0 [emitted] main
    [2] ./lib/action2gcode/generators/abstract-generator.js 1.61 kB {0} [built]
    [3] ./lib/mesh.js 20.9 kB {0} [built]
    [4] ../~/clipper-lib/clipper.js 211 kB {0} [built]
    [10] ../~/snapsvg/dist/snap.svg.js 282 kB {0} [built]
    [13] ../~/poly2tri/src/triangle.js 16.1 kB {0} [built]
    [14] ./lib/cam-gcode-laser-cut.js 11.8 kB {0} [built]
    [15] ./lib/action2gcode/gcode-generator.js 974 bytes {0} [built]
    [16] ./lib/action2gcode/generators/default-generator.js 2.38 kB {0} [built]
    [17] ./lib/action2gcode/generators/marlin-generator.js 2.75 kB {0} [built]
    [18] ./lib/cam.js 16 kB {0} [built]
    [19] ../~/babel-loader/lib?{"presets":["react"],"plugins":["transform-es2015-destructuring","transform-es2015-parameters","transform-object-rest-spread","transform-es2015-modules-commonjs","react-hot-loader/babel"]}!./lib/workers/cam-lasercut.js 1.6 kB {0} [built]
    [20] ../~/gl-matrix/lib/gl-matrix.js 548 bytes {0} [built]
    [23] ../~/gl-matrix/lib/gl-matrix/quat2.js 22.6 kB {0} [built]
    [28] ../~/poly2tri/src/sweepcontext.js 14.8 kB {0} [built]
    [32] ../~/script-loader!../~/web-cam-cpp/web-cam-cpp.js 235 bytes {0} [built]
    + 31 hidden modules

    ERROR in 6465bc71fed0a3f02b80.worker.js from UglifyJs
    Unexpected token: name (AbstractGenerator) [./lib/action2gcode/generators/abstract-generator.js:4,6][6465bc71fed0a3f02b80.worker.js:896,4]
    npm ERR! code ELIFECYCLE
    npm ERR! errno 2
    npm ERR! laserweb@4.0.996 bundle-prod: `webpack -p --progress --colors`
    npm ERR! Exit status 2
    npm ERR!
    npm ERR! Failed at the laserweb@4.0.996 bundle-prod script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/fabrice/.npm/_logs/2018-09-27T13_12_35_916Z-debug.log
在 Linux 上构建失败 #516
成员

“bundle-prod”很久以来就坏了。只需使用“bundle-dev”即可。

在 Linux 上构建失败 #516

谢谢你的提示 !我现在可以在 Linux 上运行 LaserWeb 使用

npm run bundle-dev
npm start

更新 wiki/How-to-Contribute 就好了