Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular build not creating dist folder on production #21004

Closed
babarinde opened this issue May 31, 2021 · 7 comments
Closed

Angular build not creating dist folder on production #21004

babarinde opened this issue May 31, 2021 · 7 comments
Labels
needs: repro steps We cannot reproduce the issue with the information given

Comments

@babarinde
Copy link

Bug Report

Affected Package

The issue is caused by package @angular/....

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Description

A clear and concise description of the problem...

When building an angular app using a Dockerfile, ng build --configuration production does not always create a dist folder
my output path is defined as "outputPath": "./dist", in angular.json

Minimal Reproduction

https://stackblitz.com/...

Exception or Error




Your Environment

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.0.1
Node: 12.16.3
Package Manager: npm 7.15.0
OS: linux x64

Angular: 12.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.1
@angular-devkit/build-angular   12.0.1
@angular-devkit/core            11.2.13
@angular-devkit/schematics      11.2.13
@schematics/angular             11.2.13
rxjs                            6.6.7
typescript                      4.2.4

Anything else relevant?

@JoostK JoostK transferred this issue from angular/angular May 31, 2021
@JoostK
Copy link
Member

JoostK commented May 31, 2021

This is presumably due to #20985.

@babarinde
Copy link
Author

Downgrading "@angular-devkit/build-angular": "12.0.0" as suggested here, solves this in the interim

@alan-agius4
Copy link
Collaborator

Duplicate of #20985.

@babarinde
Copy link
Author

@alan-agius4, Thanks,
However, that posted downgrade did not work, The problem with this issue is that sometimes the dist folder is created sometimes it is not. coincidentally a downgrade at that time seemed to be the reason why the dist folder was created, subsequent deployments DID NOT create the dist folder.
Marking this as a duplicates assumes you know what is wrong, but I am honestly clueless about the referred issue. This issue was only created out of our frustrations building and deploying angular to staging and production servers as we could not reliably guarantee that all docker images built and deployed had the dist folder in them.

@alan-agius4
Copy link
Collaborator

@babarinde, In that case, let me re-open the issue, but we'd require a reproduction to investigate this any further.

@alan-agius4 alan-agius4 reopened this Jun 1, 2021
@alan-agius4 alan-agius4 added the needs: repro steps We cannot reproduce the issue with the information given label Jun 1, 2021
@babarinde
Copy link
Author

Upon further investigations, we noticed that its possible the server building the docker image may have been running out of memory at the point it should have created the dist folder. When we increase memory on server it builds with the dist folder and our deployments are fine.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: repro steps We cannot reproduce the issue with the information given
Projects
None yet
Development

No branches or pull requests

3 participants