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

ng add @angular/pwa doesn't create service worker script #12098

Closed
alexeagle opened this issue Sep 4, 2018 · 5 comments
Closed

ng add @angular/pwa doesn't create service worker script #12098

alexeagle opened this issue Sep 4, 2018 · 5 comments

Comments

@alexeagle
Copy link
Contributor

From @phl3x0r on May 17, 2018 9:6

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x] schematics

Versions

$ node --version
v8.9.0
$ npm --version
3.10.10
$ ng v
...
Angular CLI: 6.0.1
Node: 8.9.0
OS: win32 x64
Angular: 6.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.6.1
@angular-devkit/build-angular      0.6.1
@angular-devkit/build-ng-packagr   0.6.1
@angular-devkit/build-optimizer    0.6.1
@angular-devkit/core               0.6.1
@angular-devkit/schematics         0.6.1
@angular/cli                       6.0.1
@angular/pwa                       0.6.3
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.1
@schematics/angular                0.6.1
@schematics/update                 0.6.1
ng-packagr                         3.0.0-rc.5
rxjs                               6.1.0
typescript                         2.7.2
webpack                            4.6.0

Repro steps

create a new project, then run ng add @angular/pwa
serve the app in production mode.

The log given by the failure

Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

Desired functionality

should work out of the box, without manually installing other packages or changing paths

Mention any other details that might be useful

Copied from original issue: angular/devkit#931

@allannienhuis
Copy link

any workarounds for this?

@ramarro123
Copy link

any update for this issue? at the moment @angular/pwa doesn't work with cli

@kanadatec
Copy link

kanadatec commented Nov 9, 2018

I faced the same issue now and I saw that the @angular/pwa package that ng add command installs is the latest one (0.10.5 as of this writing), whereas we are developing using Angular v6.x and if I install the v6-lts tagged version mentioned here: https://www.npmjs.com/package/@angular/pwa?activeTab=versions then the ng add command succeeds which was previously failing with a call stack size exceeded error.

The command I ran was ng add @angular/[email protected]

@alan-agius4
Copy link
Collaborator

See #12914

@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 Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants