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

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

Merged
merged 5 commits into from
Jun 4, 2024

Conversation

9kubczas4
Copy link
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

src/frameworks/angular/utils.ts Outdated Show resolved Hide resolved
src/frameworks/angular/utils.ts Outdated Show resolved Hide resolved
@9kubczas4 9kubczas4 requested a review from leoortizz June 4, 2024 13:25
@9kubczas4 9kubczas4 enabled auto-merge (squash) June 4, 2024 18:30
@9kubczas4 9kubczas4 merged commit 33e7156 into master Jun 4, 2024
39 checks passed
@Erkam246
Copy link

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

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

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
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

deanbiltup commented Sep 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants