-
Notifications
You must be signed in to change notification settings - Fork 12k
Error: Local workspace file ('angular.json') could not be found. #11137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I can't see that behaviour when following your repro. Can you provide a repository where this happens please? Just to confirm though, did you change directory into |
Dupe of #10757 |
You have to run ng serve --open in the same folder that creates your project. In your case the folder sample |
The steps are all fine except you have to do one more step to run the angular application. |
For people googling this error. It’s probably because your global @angular/cli version and @angular/compiler-cli are differentf here is how to fix it (my blog). |
This is because you have install angular in some directory and trying to use ng serve without creating your new project set-up |
I am facing following error: Local workspace file ('angular.json') could not be found. |
I'm having the same issue |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Area
Versions
Angular CLI: 6.0.8
Node: 8.11.2
OS: win32 x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.0
typescript 2.7.2
webpack 4.8.3
Windows 7 x64
Repro steps
In VS Code Integrated Terminal:
ng new sample
Then:
npm install --save @ng-bootstrap/ng-bootstrap
And then:
ng serve --open
The log given by the failure
Error: Local workspace file ('angular.json') could not be found. Error: Local workspace file ('angular.json') could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\workspace-loader.js:37:19) at WorkspaceLoader.loadWorkspace (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\workspace-loader.js:24:21) at ServeCommand._loadWorkspaceAndArchitect (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:180:32) at ServeCommand.<anonymous> (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:47:25) at Generator.next (<anonymous>) at C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:7:71 at new Promise (<anonymous>) at __awaiter (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:3:12) at ServeCommand.initialize (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:46:16) at Object.<anonymous> (C:\Users\[username]\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js:87:23)
Desired functionality
It should open the browser and show the running angular app
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: