Please enable Javascript for better experience...
Error: Local workspace file ('angular.json') could not be found. - Angular 6
By Big | Aug 6, 2018 | In Tips | Total Views [ 1237 ]
Taged In
(0 Like)
Rate

Getting this error:

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

Introduction

I noticed that after updating angular cli, my existing project started giving this error. Error: Local workspace file ('angular.json') could not be found.

This is complete error

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

    at WorkspaceLoader._getProjectWorkspaceFilePath (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\workspace-loader.j

s:44:19)

    at WorkspaceLoader.loadWorkspace (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\workspace-loader.js:31:21)

    at ServeCommand._loadWorkspaceAndArchitect (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\architect-command.js:18

9:32)

    at ServeCommand.<anonymous> (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\architect-command.js:55:25)

    at Generator.next (<anonymous>)

    at E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\architect-command.js:14:71

    at new Promise (<anonymous>)

    at __awaiter (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\architect-command.js:10:12)

    at ServeCommand.initialize (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\architect-command.js:54:16)

    at Object.<anonymous> (E:\PROJECT\MyProjects\NewAngDemoAppWithRoute\node_modules\@angular\cli\models\command-runner.js:90:23)

Solution for the problem

This issue is faced because of mismatch of angular cli version. In older versions file "angular-cli.json" was used for configuration purpose in angular project but angular cli version 6.1.1 used "angular.json" file for configuration. Just run below command.

ng update @angular/cli

It will update your cli version and problem resolves.

Share this

About the Author

Big
Rahul Jha (Big)
Founder, Developer dotnet-concept.com
Has working experience in different phases of Software Development Life Cycle (SDLC) in CMS, Gaming, Health Care and Financial Services domain using Agile pattern. Working experience in Design patterns, ASP.NET, MVC, Windows application, WCF, ADO.NET, SQL Server and Test Driven Development (TDD) environment with JQuery, JavaScript, N-Unit, Entity Frameworks, LINQ, Code Refactoring and Business Objects Models.

User's Comments


 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment