Skip to content

Conversation

dgp1130
Copy link
Collaborator

@dgp1130 dgp1130 commented Nov 16, 2024

Running the SSR dev server when browser-sync is not installed would print the error, but then build the browser and server targets, then hang and never return control to the user until they manually Ctrl+C. This change skips building at all if browser-sync is not installed, immediately returning control to the user.

This is a simple workaround, but there are two deeper bugs which would benefit from investigation:

  1. Figure out why NPM sometimes doesn't install browser-sync. It was happening inconsistently for me when running ng add @angular/ssr.
  2. Figure out why Architect does not cancel/await targets still executing when a builder completes.

I'm not sure if this fix should be backported to older versions, but we can worry about that after the v19 launch.

@dgp1130 dgp1130 added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 16, 2024
@dgp1130 dgp1130 requested a review from alan-agius4 November 16, 2024 05:26
…r-sync` is not installed

Running the SSR dev server when `browser-sync` is not installed would print the error, but then build the browser and server targets, then hang and never return control to the user until they manually Ctrl+C. This change skips building at all if `browser-sync` is not installed, immediately returning control to the user.

This is a simple workaround, but there are two deeper bugs which would benefit from investigation:
1.  Figure out why NPM sometimes doesn't install `browser-sync`. It was happening inconsistently for me when running `ng add @angular/ssr`.
2.  Figure out why Architect does not cancel/await targets still executing when a builder completes.
@dgp1130 dgp1130 added this to the v19 Candidates milestone Nov 16, 2024
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 16, 2024
@dgp1130 dgp1130 merged commit 5d79ab7 into angular:main Nov 18, 2024
31 checks passed
@dgp1130
Copy link
Collaborator Author

dgp1130 commented Nov 18, 2024

The changes were merged into the following branches: main, 19.0.x

@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 Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: @angular-devkit/build-angular target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants