Error: Local workspace file ('angular.json') could not be found

前端 未结 23 884
-上瘾入骨i
-上瘾入骨i 2020-11-28 01:10

I have travis-ci integrated with my GitHub account (https://github.com/pradeep0601/Angular5-Router-App).

When I updated @angular/cli versio

相关标签:
23条回答
  • 2020-11-28 01:53

    Try using the below command:

    ng update @angular/cli --migrate-only --from=1.7.4
    

    It will perform the below

    • Updating karma configuration

    • Updating configuration

    • Removing old config file (.angular-cli.json)

    • Writing config file (angular.json)

    Pls note that the above command should be run in the folder where you have file .angular-cli.json and it will be then replaced by angular.json.

    0 讨论(0)
  • 2020-11-28 01:55

    I was getting the same error messages. It was a silly mistake on my end, I was not running ng serve in the directory where my Angular project is. Make sure you are in the correct directory (project directory) before running this command.

    0 讨论(0)
  • 2020-11-28 01:56

    If you don't know the version ,current project has been made, you can omit --from command and type --migrate-only

    ng update @angular/cli --migrate-only

    0 讨论(0)
  • 2020-11-28 01:56

    Check out this link to migrate from Angular 5.2 to 6. https://update.angular.io/

    Upgrading to version 8.9 worked for me.

    0 讨论(0)
  • 2020-11-28 01:57

    I was having this error message inside a docker container. I resolved it adding:

    WORKDIR /usr/src
    

    to Dockerfile.

    0 讨论(0)
  • 2020-11-28 01:58

    I was trying to set my Ionic 4 app to run as a pwa. When I run the command:

    ng add @angular/pwa
    

    ...got the error message. After some try and error I discovered that when my project was created the start command was wrong. I was using an Ionic 3 version:

    ionic start myApp tabs --type=ionic-angular
    

    And the correct is:

    ionic start myApp tabs --type=angular
    

    with no 'ionic-' in type. This solved the error.

    0 讨论(0)
提交回复
热议问题