Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Angular Pipeline - ng build -prod error: The build command requires to be run in an Angular project

Matthew Allen December 9, 2019

Lots of beginner questions so I'm going to be explicit in my process.

I'm using a Windows server command prompt.  I have ng and npm installed.  I created the Hello World test app in Angular.  I can use "ng serve" to build and run the app, and successfully see the output in a browser window.  I type ng build -prod and it creates the /dist folder.

I created the repo in BitBucket and added my source code (not the /dist folder, though).  I enabled pipelines and am using this yml:

image: trion/ng-cli

pipelines:
  default:
    - step:
      script:
        - cd my-app
        - ng build -prod

 

Full error message is "The build command requires to be run in an Angular project, but a project definition could not be found."  I added the cd command as I thought perhaps I wasn't in the proper folder.

1 answer

0 votes
Peter Plewa
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2020

Hi @Matthew Allen

Your project may require adding `npm install`. Let me know if that helps.

Thanks,
Peter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events