I have travis-ci
integrated with my GitHub account (https://github.com/pradeep0601/Angular5-Router-App).
When I updated @angular/cli
version from 1.7.4 to 6.0.0-rc.3, the build started failing with an error:
Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found.
at WorkspaceLoader._getProjectWorkspaceFilePath (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/workspace-loader.js:37:19)
at WorkspaceLoader.loadWorkspace (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/workspace-loader.js:24:21)
at TestCommand._loadWorkspaceAndArchitect (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:177:32)
at TestCommand.<anonymous> (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:45:25)
at Generator.next (<anonymous>)
at /home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:7:71
at new Promise (<anonymous>)
at __awaiter (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:3:12)
at TestCommand.initialize (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:44:16)
at /home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/command-runner.js:100:23
package.json snippet to better understand the running environment:
"@angular/cli": "6.0.0-rc.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
I also faced same issue and i just executed below command.
It simply delete
angular-cli.json
and createangular.json
. You can find this in logs.Once you start execution. You will be able to see below logs in your terminal.
Check out this link to migrate from Angular 5.2 to 6. https://update.angular.io/
Upgrading to version 8.9 worked for me.
For me the problem was because of global @angular/cli version and @angular/compiler-cli were different. Look into package.json.
And if they don’t match, update or downgrade one of them.
I was having this error message inside a docker container. I resolved it adding:
to Dockerfile.
I just had the same problem.
It's related to release v6.0.0-rc.2, https://github.com/angular/angular-cli/releases:
I needed to execute:
This removed
.angular-cli.json
and createdangular.json
.If this leads to your project using 1.7.4, install v6 locally:
And try once again to update your project with:
For me what worked was creating a new Angular project and just copied the angular.json file in the project that had a problem due to the fact that the angular.json file was missing.