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

1
  • 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. Commented May 17, 2018 at 16:11

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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

3 Comments

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
Yep, you were right, angular.json was the thing i was searching for
@hyena I referred to angular.json in the below answer. Wondering why it’s commented in this answer and marked as the accepted one ?? ☹️

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.