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

Service worker generation fails with prerendering (Angular 14) #2706

Closed
3 tasks
michael-hein opened this issue Jun 22, 2022 · 1 comment · Fixed by #2709
Closed
3 tasks

Service worker generation fails with prerendering (Angular 14) #2706

michael-hein opened this issue Jun 22, 2022 · 1 comment · Fixed by #2709

Comments

@michael-hein
Copy link

🐞 Bug report

What modules are related to this issue?

  • builders
  • common
  • express-engine

Is this a regression?

Yes, the previous version in which this bug was not present was:
"@angular/core": "13.3.11",
"@nguniversal/express-engine": "13.1.1"

Description

The prerendering build fails when using prerendering with a service worker.
Without prerendering it works fine and without service worker it works to. But together the build fails.

🔬 Minimal Reproduction

  1. use the finished example of universal https://angular.io/guide/universal (https://angular.io/generated/zips/universal/universal.zip)
  2. add service worker ng add @angular/pwa
  3. run prerendering npm run prerender

🔥 Exception or Error


Build at: 2022-06-22T14:17:43.435Z - Hash: c7f6384565f60d28 - Time: 21316ms
⠴ Prerendering 3 route(s) to C:\Users\MichaelHein\Downloads\universal\dist\browser...Running on the server with appId=tour-of-heroes
Running on the server with appId=tour-of-heroes
Running on the server with appId=tour-of-heroes
✔ Prerendering routes to C:\Users\MichaelHein\Downloads\universal\dist\browser complete.
✖ Service worker generation failed.
ENOENT: no such file or directory, opendir 'C:\C\Users\MichaelHein\Downloads\universal\dist\browser'

🌍 Your Environment


Angular CLI: 14.0.2
Node: 16.15.1
Package Manager: npm 7.24.2
OS: win32 x64

Angular: 14.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.2
@angular-devkit/build-angular   14.0.2
@angular-devkit/core            14.0.2
@angular-devkit/schematics      14.0.2
@nguniversal/builders           14.0.1
@nguniversal/express-engine     14.0.1
@schematics/angular             14.0.2
rxjs                            7.5.5
typescript                      4.7.4
@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 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants