if i ran the "npm build " in the first step. It's working fine. but if i split the "npm run" to the next step it's failing and seeing the below error:
Error Block :
> xdex-ui@0.0.0 build /opt/atlassian/pipelines/agent/build
> ng build
Node.js version v4.2.1 detected.
The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
npm ERR! Linux 5.13.0-1017-azure
npm ERR! argv "/bin/versions/node/v4.2.1/bin/node" "/bin/versions/node/v4.2.1/bin/npm" "run" "build" "--configuration=dev" "--optimization=false"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! xdex-ui@0.0.0 build: `ng build`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the xdex-ui@0.0.0 build script 'ng build'.
npm ERR! This is most likely a problem with the xdex-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng build
npm ERR! You can get their info via:
npm ERR! npm owner ls xdex-ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/atlassian/pipelines/agent/build/npm-debug.log
My pipeline.yml
pipelines:
branches:
feature/cicd-test:
- step:
name: install
image: node:14.17.1
caches:
- node
script:
- npm install
artifacts:
- node_modules/**
- step:
name: deploy
deployment: Dev
trigger: manual
script:
- npm run build ## environment specific
- python3 deploy.py
please advise.