angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng add @angular/pwa fails

Open bjornharvold opened this issue 8 years ago • 12 comments

Bug Report or Feature Request (mark with an x)

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

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [x ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 6.1.0 Node: 10.7.0 OS: darwin x64 Angular: 6.1.0 ... animations, cli, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.7.0 @angular-devkit/build-angular 0.7.0 @angular-devkit/build-ng-packagr 0.7.0 @angular-devkit/build-optimizer 0.7.0 @angular-devkit/build-webpack 0.7.0 @angular-devkit/core 0.7.0 @angular-devkit/schematics 0.7.0 @ngtools/json-schema 1.1.0 @ngtools/webpack 6.1.0 @schematics/angular 0.7.0 @schematics/update 0.7.0 ng-packagr 3.0.3 rxjs 6.2.2 typescript 2.7.2 webpack 4.9.2

Repro steps

ng new something
cd something
ng add @angular/pwa

The log given by the failure

Installing packages for tooling via npm.
+ @angular/[email protected]
added 2 packages from 2 contributors and audited 29129 packages in 7.355s
found 13 vulnerabilities (9 low, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Installed packages for tooling via npm.
Path "/ngsw-config.json" already exist.

Desired functionality

Service worker being added successfully to my project

bjornharvold avatar Jul 26 '18 03:07 bjornharvold

Same problem here. Is it related to 6.1.0? It just came out, probably not tested. I have Node 8.11 as a difference to the above configuration.

proeben avatar Jul 26 '18 08:07 proeben

@proeben : The problem wasn't there with the previous cli version I had - 6.0.8

batbrain9392 avatar Jul 26 '18 11:07 batbrain9392

Duplicate of #11640.

gkalpak avatar Jul 26 '18 12:07 gkalpak

I got the same error after getting latest update

_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 6.1.1
Node: 9.11.2
OS: darwin x64
Angular: 6.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.1
@angular-devkit/build-angular     0.7.1
@angular-devkit/build-optimizer   0.7.1
@angular-devkit/build-webpack     0.7.1
@angular-devkit/core              0.7.1
@angular-devkit/schematics        0.7.1
@angular/cli                      6.1.1
@angular/pwa                      0.7.1
@ngtools/webpack                  6.1.1
@schematics/angular               0.7.1
@schematics/update                0.7.1
rxjs                              6.2.2
typescript                        2.7.2
webpack                           4.9.2

guysenpai avatar Jul 26 '18 20:07 guysenpai

Same issue v6.1.1

bernhardpointner avatar Jul 27 '18 08:07 bernhardpointner

Same issue here too CLI V6.1.1

html5ravi avatar Jul 30 '18 13:07 html5ravi

I've tried this on a vanilla Ionic 4 beta 2 (latest) installation and I get Path "/ngsw-config.json" already exist.. I also tried to install 0.8.0-beta.2 and I get the same thing.

ix-xerri avatar Aug 12 '18 14:08 ix-xerri

yep, it doesn't work on v6.1.1 :(

paulimfavarato avatar Aug 13 '18 13:08 paulimfavarato

Got it to work with @angular/cli": "^6.2.0-beta.2 and @angular/pwa": "^0.8.0-beta.2

cc-xerri avatar Aug 13 '18 14:08 cc-xerri

Since this issue has been marked as duplicate of #11640, you might want to check out #11640 for the current state and suggestions (e.g. https://github.com/angular/angular-cli/issues/11640#issuecomment-410638864 🙈).

gkalpak avatar Aug 13 '18 14:08 gkalpak

I will wait the 6.2.0 to be release and PWA 0.8.0 to be release personally.... This issue has been around for 3 weeks, seriously that is ridiculous...

schankam avatar Aug 16 '18 08:08 schankam

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.