ng not found error while docker build in jenkins pipeline (script)
Issue found on npm while docker build: hicare_omdashboard_prod
The issue is simple, npm doesn't know about ng.
npm doesn't know about ng.I got the following issue while docker build: 

From the logs shell script, I found:
> store-web@0.0.0 build /App
> ng build
[91msh: 1: ng: not found
[0m[91mnpm ERR! code[0m[91m ELIFECYCLE
[0m[91mnpm[0m[91m ERR! syscall spawn
npm[0m[91m ERR! file sh
[0m[91mnpm ERR! [0m[91merrno ENOENT
[0m[91mnpm ERR! store-web@0.0.0 build: `ng build`
npm[0m[91m ERR! spawn ENOENT
npm [0m[91mERR! 
npm ERR! Failed at the store-web@0.0.0 build script.
npm[0m[91m [0m[91mERR! This is probably not a problem with npm. There is likely additional logging output above.
[0m[91m
npm ERR! A complete log of this run can be found in:
[0m[91mnpm ERR
Later, I installed the angular/cli in cli instead of dockerfile: Install in the jenkins server cli:
npm install -g @angular/cli@latest
Issue is finally solved. 🎉
PreviousAttach trivy report on email (jenkins pipeline)NextAuto Trigger Jenkins Build /Jobs with github webhook
Last updated