Closed
Description
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
Yes
Description
After updating from v20.0.0 to v20.0.1 i receive this:
R3InjectorError(Environment Injector)[_SwUpdate -> NgswCommChannel -> NgswCommChannel]: NullInjectorError: No provider for NgswCommChannel!
Vite, esbuild + ssr enabled.
provideServiceWorker() located in app.config.browser.ts.
Code, which triggers that error:
private readonly swUpdate = inject(SwUpdate, { optional: true });
As per latest commits, SwUpdate is now provided in root. Should i provide service worker for server&browser?
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
R3InjectorError(Environment Injector)[_SwUpdate -> NgswCommChannel -> NgswCommChannel]: NullInjectorError: No provider for NgswCommChannel!
Please provide the environment you discovered this bug in (run ng version
)
"@angular/cdk": "20.0.1",
"@angular/common": "20.0.1",
"@angular/compiler": "20.0.1",
"@angular/core": "20.0.1",
"@angular/platform-browser": "20.0.1",
"@angular/platform-server": "20.0.1",
"@angular/router": "20.0.1",
"@angular/service-worker": "20.0.1",
"@angular/ssr": "20.0.1",
Anything else?
No response