在package-lock.json中指定node-mass版本+独立编译flink中的flink-runtime-web模块
作者:互联网
环境:
重要组件/系统 | 版本 |
node | v12.11.1 |
npm | 6.11.3 |
node-sass | 4.14.1 |
Ubuntu | 19.10 |
#########################################################################################
实时计算Flink下载地址[1]
独立编译flink-runtime-web
②cd flink/flink-runtime-web/
因为v4.11.0中不存在提示中的linux-x64-72_binding.node[2]
[3]中作者也明确说明已经升级为支持node12了,承认了删除这个问题
所以这个文件已经不存在了.
③package-lock.json中的所有4.11.0批量替换为4.14.1
④修改"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz"下面的integrity
这个integrity如何修改呢?
从https://registry.npmjs.org/node-sass搜索node-sass-4.14.1.tgz即可得到.
⑤npm ci --cache-max=0 --no-save
⑥npm run build
flink-runtime-web/pom.xml中的237-268和npm相关的全部删除
⑦回到flink根目录,进行整体mvn编译
mvn clean install -T 2C -DskipTests -Dmaven.compile.fork=true
最終效果:
#################################附录#########################################################
编译log如下:
(Python3.6) appleyuchi@Desktop:web-dashboard$ npm ci --cache-max=0 --no-save
npm WARN tarball tarball data for monaco-editor@0.16.2 (sha512-NtGrFzf54jADe7qsWh3lazhS7Kj0XHkJUGBq9fA/Jbwc+sgVcyfsYF6z2AQ7hPqDC+JmdOt/OwFjBnRwqXtx6w==) seems to be corrupted. Trying one more time.
> fsevents@1.2.7 install /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard/node_modules/fsevents
> node install
> node-sass@4.14.1 install /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard/node_modules/node-sass
> node scripts/install.js
Cached binary found at /home/appleyuchi/.npm/node-sass/4.14.1/linux-x64-72_binding.node
> node-sass@4.14.1 postinstall /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard/node_modules/node-sass
> node scripts/build.js
Binary found at /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard/node_modules/node-sass/vendor/linux-x64-72/binding.node
Testing binary
Binary is fine
> husky@1.3.1 install /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard/node_modules/husky
> node husky install
husky > setting up git hooks
husky > done
added 1302 packages in 75.754s
(Python3.6) appleyuchi@Desktop:web-dashboard$ npm run build
> flink-dashboard@2.0.0 build /home/appleyuchi/桌面/超线程测试/flink/flink-runtime-web/web-dashboard
> ng build --prod --base-href ./
10% building 4/5 modules 1 active ...web/web-dashboard/src/styles/index.lessBrowserslist: caniuse-lite is outdated. Please run next command `npm update`
Date: 2020-06-17T02:11:28.801Z
Hash: 7a956d005eaf07271813
Time: 91190ms
chunk {0} common.2e107ed758cbf08ff8c3.js (common) 12.9 kB [rendered]
chunk {1} runtime.0dcf16aad31edd73d8e8.js (runtime) 2.38 kB [entry] [rendered]
chunk {2} 2.1be1fd5e3d6ea1f370b5.js () 221 kB [rendered]
chunk {3} 3.7d83c2faf0fd41a603d0.js () 557 kB [rendered]
chunk {4} 4.74c456251ccb13c0b02e.js () 9.36 kB [rendered]
chunk {5} es2015-polyfills.c9fc7a4ebe852d142120.js (es2015-polyfills) 56.4 kB [initial] [rendered]
chunk {6} main.bec5261a55e880d7de65.js (main) 1.17 MB [initial] [rendered]
chunk {7} polyfills.bb2456cce5322b484b77.js (polyfills) 41 kB [initial] [rendered]
chunk {8} styles.30d0912c1ece284d8d9a.css (styles) 426 kB [initial] [rendered]
chunk {9} 9.b5033223ed27c51844a6.js () 15.9 kB [rendered]
chunk {10} 10.b080209932dd17d83af3.js () 37.2 kB [rendered]
chunk {11} 11.497fa6c041217f34d29a.js () 157 kB [rendered]
chunk {12} 12.691ed0307ff2c8a6984d.js () 77.9 kB [rendered]
chunk {13} 13.1d50ed74896698cc500d.js () 20.9 kB [rendered]
chunk {14} 14.a07af2f95cb8013851d8.js () 144 kB [rendered]
#################################################################
Reference:
[1]https://gitee.com/fastsource/flink
[2]https://github.com/sass/node-sass/releases/tag/v4.11.0
[3]https://github.com/sass/node-sass/issues/2653
标签:node,web,rendered,chunk,flink,js 来源: https://blog.csdn.net/appleyuchi/article/details/106796295