Reputation: 992
I am using Jenkins for Angular 6 Project Build Purpose and getting below error:
/app/apache-tomcat-8.5.34/temp/jenkins423226075999853444.sh: 27: /app/apache-tomcat-8.5.34/temp/jenkins423226075999853444.sh: ng: not found
I tried to add @angular/cli but no luck. What's the solution for this issue?
Upvotes: 1
Views: 1085
Reputation: 992
I was able to resolve the issue using this command: npm run ng -- build
Upvotes: 2
Reputation: 13722
The issue is due to fail to find ng
in current work directory and PATH environment
1) Add @angular/cli
as a dependency into package.json
2) change ng xxxx
to node_modules\.bin\ng xxxx
Upvotes: 1
Reputation: 1165
That's because angular/cli is not installed globally in your Jenkins environment.
Make sure you have node / npm installed and try building your project with npm run build [--prod]
Upvotes: 1