简体   繁体   中英

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.

It looks like your Dockerfile starts with node: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. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM