1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Adding @angular/pwa not working on angular CLI

Discussão em 'Angular' iniciado por Farhan Islam, Junho 30, 2025.

  1. Farhan Islam

    Farhan Islam Guest

    I'm trying to run the command ng add @angular/pwa --my project name so that I can implement service workers in my angular project but the error that I'm returned is "The add command requires to be run in an Angular project, but a project definition could not be found." If anyone can shed some light on what I can do to get past this error it would be much appreciated. I was upgrading from Angular CLI version 1.49. I have a feeling it has something to do with the angularcli.json file since the new version uses angular.json file.

    This is also an exception when I try to use ng serve : Workspace needs to be loaded before it is used. Error: Workspace needs to be loaded before it is used

    this is my version details:

    / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
    / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
    / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
    /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
    |___/


    Angular CLI: 7.0.1
    Node: 10.12.0
    OS: darwin x64
    Angular: 5.2.11
    ... animations, common, compiler, compiler-cli, core, forms
    ... http, platform-browser, platform-browser-dynamic
    ... platform-server, router

    Package Version
    ------------------------------------------------------
    @angular-devkit/architect 0.10.1
    @angular-devkit/core 0.3.2
    @angular-devkit/schematics 7.0.1
    @angular/cli 7.0.1
    @ngtools/webpack 1.10.2
    @schematics/angular 7.0.1
    @schematics/update 0.10.1
    rxjs 5.5.12
    typescript 3.1.1
    webpack 3.11.0

    Continue reading...

Compartilhe esta Página