简体   繁体   English

docker 构建出现错误,检测到节点 v10,Angular CLI 需要 v12.14 或 v14.15 的最低 Node.js 版本

[英]docker build gives error, node v10 detected, The Angular CLI requires a minimum Node.js version of either v12.14 or v14.15

在此处输入图像描述 在此处输入图像描述

I want to deploy my angular app on docker, here I'm creating docker-image but it is giving me an error that node v10 is detected but I have no node version 10 installed in my system.我想在 docker 上部署我的 angular 应用程序,在这里我正在创建 docker-image 但它给我一个错误,即检测到节点 v10,但我的系统中没有安装节点版本 10。

It looks like your Dockerfile starts with node:10-alpine .看起来您的Dockerfilenode:10-alpine开头。 The ng build command will use this Node version, not the one in your local machine, because it is running inside that Docker container. ng build命令将使用这个 Node 版本,而不是本地机器上的那个,因为它在 Docker 容器内运行。 As the error message says, you need to increase this to a more recent version.正如错误消息所说,您需要将其增加到更新的版本。

eg change例如改变

FROM node:10-alpine

to

FROM node:14.18-alpine

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular CLI 需要最低 Node.js 版本 v14.20、v16.13 或 v18.10 - The Angular CLI requires a minimum Node.js version of either v14.20, v16.13 or v18.10 无法构建 Angular - “检测到 Node.js 版本 v10.6.0。” - Unable to build Angular - "Node.js version v10.6.0 detected." 解析错误:Firebase云功能中出现意外的令牌selectWinner-Node.js V10 - Parsing error: Unexpected token selectWinner in Firebase cloud function - Node.js V10 Node.js加密PBKDF2函数在v8与v10上返回不同的值 - Node.js crypto PBKDF2 function returns different values on v8 vs v10 ng 构建失败并显示“您正在运行 Node.js 的 v8.11.3 版本,Angular CLI 8.0+ 不支持该版本。” - ng build fails with “You are running version v8.11.3 of Node.js, which is not supported by Angular CLI 8.0+.” '您正在运行 Node.js 的版本 ' + process.version + ',Angular CLI v6 不支持该版本 - 'You are running version ' + process.version + ' of Node.js, which is not supported by Angular CLI v6 使用 node JS v10 开发的 React 应用 - React application developed using node JS v10 Angular CLI 在 ng 更新期间未检测到 NPM 版本(v10 --> v11) - Angular CLI doesn't detect NPM version during ng update (v10 --> v11) 如何在Linux上升级angular-cli? CLI v6不支持Node.js V6.14.3 - How to upgrade angular-cli on Linux? Node.js V6.14.3 not supported by CLI v6 如何验证node.js版本(node -v除外) - How to verify node.js version (other than node -v)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM