Skip to content

fix: support deployment of an Angular app using legacy browser builder#7264

Merged
9kubczas4 merged 5 commits intomasterfrom
fix/support-legacy-browser-builder-angular
Jun 4, 2024
Merged

fix: support deployment of an Angular app using legacy browser builder#7264
9kubczas4 merged 5 commits intomasterfrom
fix/support-legacy-browser-builder-angular

Conversation

@9kubczas4
Copy link
Copy Markdown
Contributor

Description

This change fixes:

The fix was done in 2 areas of the code:

  • @angular-devkit/build-angular:browser (app:build:production) is not a recognized builder was thrown because @angular-devkit/build-angular:browser wasn't recognized as build target.
  • @angular-devkit/build-angular:browser doesn't create browser subfolder in the output path

Scenarios Tested

I've built and deployed to firebase Angular apps (v17) which use:

  • @angular-devkit/build-angular:browser
  • @angular-devkit/build-angular:application

Sample Commands

@9kubczas4 9kubczas4 requested a review from leoortizz June 4, 2024 13:25
@Erkam246
Copy link
Copy Markdown

Erkam246 commented Jun 15, 2024

@9kubczas4 could you provide us the configuration for @angular-devkit/build-angular:application

Im getting:

Error: @angular-devkit/build-angular:application (app:build:production) is not a recognized builder. Please check your angular.json

with this configuration:

"deploy": {
          "builder": "@angular/fire:deploy",
          "options": {
            "version": 2,
            "browserTarget": "app:build:production"
          }
        }

Update got it working by removing the deploy configuration and changing outputPath to a string

rinebob added a commit to rinebob/friendly-chat that referenced this pull request Aug 6, 2024
Fixes Error: @angular-devkit/build-angular:application (friendlychat:build:production) is not a recognized builder. Please check your angular.json
From firebase/firebase-tools#7264
@rinebob
Copy link
Copy Markdown

rinebob commented Aug 6, 2024

Suggestion from @Erkam246 worked for me. I was trying to start the emulators and getting

c:\aa\projects\friendly-chat>firebase emulators:start
i emulators: Starting emulators: auth, functions, firestore, hosting, storage
...
i emulators: Shutting down emulators.
i hub: Stopping emulator hub

Error: @angular-devkit/build-angular:application (friendlychat:build:production) is not a recognized builder. Please check your angular.json

Removing the deploy configuration from angular.json allowed the emulators to start properly

@deanbiltup
Copy link
Copy Markdown

firebase deploy works but the cloud builder fails until I modify to application and then my local no longer works :(. Also, when I get cloud building it doesn't seem to use my changes at all. It says success but the app never changes from my last firebase deploy :( :( . If I leave browser builder, cloud builder fails.

@9kubczas4
Copy link
Copy Markdown
Contributor Author

9kubczas4 commented Sep 12, 2024

Hi @deanbiltup,

Could you create a new issue and provide me a little more details like steps to reproduce, logs etc.

Thank you in advance

@deanbiltup
Copy link
Copy Markdown

deanbiltup commented Sep 12, 2024 via email

jornetsimon added a commit to jornetsimon/moumou-pad that referenced this pull request Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants