TT Bigdata TT Bigdata
首页
  • 部署专题

    • 常规安装
    • 一键部署
  • 组件安装

    • 常规&高可用
  • 版本专题

    • 更新说明
  • Ambari-Env

    • 环境准备
    • 开始使用
  • 组件编译

    • 专区—Ambari
    • 专区—Bigtop
  • 报错解决

    • 专区—Ambari
    • 专区—Bigtop
  • 其他技巧

    • Maven镜像加速
    • Gradle镜像加速
    • Bower镜像加速
    • 虚拟环境思路
    • R环境安装+一键安装脚本
    • Ivy配置私有镜像仓库
    • Node.js 多版本共存方案
    • Ambari Web本地启动
    • Npm镜像加速
    • PostgreSQL快速安装
    • Temurin JDK 23快速安装
  • 成神之路

    • 专区—Ambari
    • 专区—Bigtop
  • 集成案例

    • Redis集成教学
    • Dolphin集成教学
    • Doris集成教学
    • 持续整理...
  • 模板代码

    • 各类组件
    • 通用模板
  • 国产化&其他系统

    • Centos系列
    • Kylin系列
    • OpenEuler系列
    • Rocky系列
    • Ubuntu系列
  • 生产调优

    • 组件调优指南
    • 1v1指导调优
  • 定制开发

    • 组件版本定制
    • 样式风格定制
  • 蓝图愿景
  • 技术支持
  • 合作共建
GitHub (opens new window)

JaneTTR

数据酿造智慧,每一滴都是沉淀!
首页
  • 部署专题

    • 常规安装
    • 一键部署
  • 组件安装

    • 常规&高可用
  • 版本专题

    • 更新说明
  • Ambari-Env

    • 环境准备
    • 开始使用
  • 组件编译

    • 专区—Ambari
    • 专区—Bigtop
  • 报错解决

    • 专区—Ambari
    • 专区—Bigtop
  • 其他技巧

    • Maven镜像加速
    • Gradle镜像加速
    • Bower镜像加速
    • 虚拟环境思路
    • R环境安装+一键安装脚本
    • Ivy配置私有镜像仓库
    • Node.js 多版本共存方案
    • Ambari Web本地启动
    • Npm镜像加速
    • PostgreSQL快速安装
    • Temurin JDK 23快速安装
  • 成神之路

    • 专区—Ambari
    • 专区—Bigtop
  • 集成案例

    • Redis集成教学
    • Dolphin集成教学
    • Doris集成教学
    • 持续整理...
  • 模板代码

    • 各类组件
    • 通用模板
  • 国产化&其他系统

    • Centos系列
    • Kylin系列
    • OpenEuler系列
    • Rocky系列
    • Ubuntu系列
  • 生产调优

    • 组件调优指南
    • 1v1指导调优
  • 定制开发

    • 组件版本定制
    • 样式风格定制
  • 蓝图愿景
  • 技术支持
  • 合作共建
GitHub (opens new window)
  • Hadoop

  • Spark

  • Trino

  • Hudi

  • Paimon

  • Livy

  • Flink

    • .git can't be found during `prepare`
    • Angular CLI requires Node >=14.15
      • 报错日志摘录
      • 原因分析
      • 真实背景补充
      • 解决方案
    • npm run ci-check 报错退出码 3
  • Atlas

  • Superset

  • Jsvc

  • Zookeeper

  • Hive

  • 报错解决-Bigtop
  • Flink
JaneTTR
2024-05-10
目录

Angular CLI requires Node >=14.15

在使用 Bigtop 编译 Flink Dashboard 过程中,ng build 报错,提示 Node.js 版本过低,构建流程直接中断。

# 报错日志摘录

[INFO] Node.js version v12.22.6 detected.
[INFO] The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10.
[INFO]
[INFO] Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
[INFO]
[INFO] npm verb lifecycle flink-dashboard@2.0.0~build: unsafe-perm in lifecycle true
[INFO] npm verb lifecycle flink-dashboard@2.0.0~build: PATH: /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/modules/bigt
op/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node_modules/.bin:/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/modu
les/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node_modules/.bin:/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node:/root/.nvm/versions/node/v12.13.0/bin:/opt/enhance_env/min
iconda2/bin:/opt/enhance_env/miniconda2/condabin:/opt/enhance_env/flex-2.6.4/bin:/usr/local/R-4.4.2/bin:/opt/modules/cmake3/bin:/opt/modules/apache-maven-3.8.4/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local
/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/modules/jdk1.8.0_202/bin:/opt/modules/gradle-5.6.4/bin:/opt/modules/apache-ant-1.10.12/bin:/opt/modules/apache-ivy-2.5.0/bin:
[INFO] npm verb lifecycle flink-dashboard@2.0.0~build: CWD: /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard
[INFO] npm info lifecycle flink-dashboard@2.0.0~build: Failed to exec build script
[INFO] npm verb stack Error: flink-dashboard@2.0.0 build: `ng build --configuration production --base-href ./`
[INFO] npm verb stack Exit status 3
[INFO] npm verb stack     at EventEmitter.<anonymous> (/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
[INFO] npm verb stack     at EventEmitter.emit (events.js:314:20)
[INFO] npm verb stack     at ChildProcess.<anonymous> (/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
[INFO] npm verb stack     at ChildProcess.emit (events.js:314:20)
[INFO] npm verb stack     at maybeClose (internal/child_process.js:1022:16)
[INFO] npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
[INFO] npm verb pkgid flink-dashboard@2.0.0
[INFO] npm verb cwd /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard
[INFO] npm verb Linux 5.15.167.4-microsoft-standard-WSL2
[INFO] npm verb argv "/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node" "/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/bin/npm-cli.js"
"run" "build"
[INFO] npm verb node v12.22.6
[INFO] npm verb npm  v6.14.5
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 3
[INFO] npm ERR! flink-dashboard@2.0.0 build: `ng build --configuration production --base-href ./`
[INFO] npm ERR! Exit status 3
[INFO] npm ERR!
[INFO] npm ERR! Failed at the flink-dashboard@2.0.0 build script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO] npm verb exit [ 3, true ]
[INFO] npm timing npm Completed in 214ms
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR!     /root/.npm/_logs/2025-05-09T15_48_24_250Z-debug.log
[INFO] npm verb lifecycle flink-dashboard@2.0.0~ci-check: unsafe-perm in lifecycle true
[INFO] npm verb lifecycle flink-dashboard@2.0.0~ci-check: PATH: /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/modules/b
igtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node_modules/.bin:/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node:/root/.nvm/versions/node/v12.13.0/bin:/opt/enhance_env/minicond
a2/bin:/opt/enhance_env/miniconda2/condabin:/opt/enhance_env/flex-2.6.4/bin:/usr/local/R-4.4.2/bin:/opt/modules/cmake3/bin:/opt/modules/apache-maven-3.8.4/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/opt/modules/jdk1.8.0_202/bin:/opt/modules/gradle-5.6.4/bin:/opt/modules/apache-ant-1.10.12/bin:/opt/modules/apache-ivy-2.5.0/bin:
[INFO] npm verb lifecycle flink-dashboard@2.0.0~ci-check: CWD: /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard
[INFO] npm info lifecycle flink-dashboard@2.0.0~ci-check: Failed to exec ci-check script
[INFO] npm verb stack Error: flink-dashboard@2.0.0 ci-check: `npm run lint && npm run build`
[INFO] npm verb stack Exit status 3
[INFO] npm verb stack     at EventEmitter.<anonymous> (/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
[INFO] npm verb stack     at EventEmitter.emit (events.js:314:20)
[INFO] npm verb stack     at ChildProcess.<anonymous> (/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
[INFO] npm verb stack     at ChildProcess.emit (events.js:314:20)
[INFO] npm verb stack     at maybeClose (internal/child_process.js:1022:16)
[INFO] npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
[INFO] npm verb pkgid flink-dashboard@2.0.0
[INFO] npm verb cwd /opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard
[INFO] npm verb Linux 5.15.167.4-microsoft-standard-WSL2
[INFO] npm verb argv "/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node" "/opt/modules/bigtop/dl/flink-1.17.2/flink-runtime-web/web-dashboard/node/node_modules/npm/bin/npm-cli.js"
"run" "ci-check" "--verbose"
[INFO] npm verb node v12.22.6
[INFO] npm verb npm  v6.14.5
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 3
[INFO] npm ERR! flink-dashboard@2.0.0 ci-check: `npm run lint && npm run build`
[INFO] npm ERR! Exit status 3
[INFO] npm ERR!
[INFO] npm ERR! Failed at the flink-dashboard@2.0.0 ci-check script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO] npm verb exit [ 3, true ]
[INFO] npm timing npm Completed in 3002ms
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR!     /root/.npm/_logs/2025-05-09T15_48_24_316Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Flink : Runtime web 1.17.2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

编译失败

Angular CLI 强制要求 Node ≥ 14.15,否则无法完成 ng build 阶段。

# 原因分析

项目 原因说明
Node.js 版本 当前使用 v12.22.6,低于 Angular CLI 要求的最低版本 14.15
编译命令 ng build 属于 Angular 的标准构建指令,依赖 ES Module 与 CLI 新特性
项目依赖 flink-dashboard 是 Angular 前端应用,版本升级后默认依赖 Angular 13+,必须满足其 Node 要求

开始默认使用 Angular 13,构建要求 Node >=14.15。Flink 1.17+

# 真实背景补充

这次报错发生在我将 Node 降级到 12.x 版本后(用于兼容 CentOS 7 的 glibc)。而原本 Bigtop 中默认的 Node 是:

Node.js 16.13.2  
npm      8.1.2
1
2

如图所示:

image-20250510103819733

最佳实践

为了兼容性与构建稳定性,建议临时使用 Node 16 构建 Web UI 后再切回低版本,避免触发 glibc 等底层兼容问题。

# 解决方案

只需将 Node 恢复到 v16+ 后,重新执行编译命令:

mvn install -Drat.skip=true -DskipTests -Dhadoop.version=3.3.4 -rf :flink-runtime-web
1

补充说明

-rf :flink-runtime-web 表示从 flink-runtime-web 模块开始继续构建,无需从头全量构建。

#Node.js#Angular#Dashboard#编译报错
.git can't be found during `prepare`
npm run ci-check 报错退出码 3

← .git can't be found during `prepare` npm run ci-check 报错退出码 3→

最近更新
01
Pandoc 缺失导致 SparkR 构建失败
06-08
02
Cyrus SASL/GSASL 缺失解决
06-07
03
Hadoop_3.3.4 编译实战 1.0.0+
06-06
更多文章>
Theme by Vdoing | Copyright © 2017-2025 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式