0

I'm trying to make a new pwa and I need to write things in angular-cli.json. I'm using

Angular CLI: 1.7.4
Node: 8.11.1
OS: win32 x64
Angular: 5.2.10.

After ng new pwaapp --service worker there's not an angular-cli.json file in the project folder.

Every idea is a breath of fresh air. thx

Naveen T P
  • 6,955
  • 2
  • 22
  • 29
hyena
  • 75
  • 3
  • 11
  • Did you check on my below answer? If you are still missing the file, post your ls from your project root along with package.json file. – Anand May 17 '18 at 16:11

2 Answers2

4

I'm wondering if you are creating Angular 6 and not Angular 5.x, as Angular 6 don't have angular-cli.json anymore. Its angular.json. See if you have this file. If you are creating a new project at this time, Angular 6 is the latest stable with some improvements to PWA as well.

Here is a doc if you want to create an app first and then add PWA options after creating.

Anand
  • 9,672
  • 4
  • 55
  • 75
1

Well to start you are not using the command correctly.

You are using ng new pwaapp --service worker while you should be using ng new pwaapp --service-worker which should generate an .angular-cli.json file.

If not, then see if you @angular/cli global package is up to date.

If nothing works, add the the file yourself as referenced here: https://stackoverflow.com/a/45705204/3123228

filipbarak
  • 1,835
  • 2
  • 17
  • 28
  • 1
    It was a typo. i'm using 'ng new pwaapp --service-worker', and still does not work. i'm gonna do it manually, and maybe it will work. thx – hyena May 14 '18 at 12:34
  • Yep, you were right, angular.json was the thing i was searching for – hyena May 18 '18 at 14:18
  • @hyena I referred to angular.json in the below answer. Wondering why it’s commented in this answer and marked as the accepted one ?? ☹️ – Anand May 21 '18 at 19:47