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

ERROR LOCAL WORKSPACE FILE ANGULAR.JSON COULD NOT BE FOUND

Why is it?

If you run into this issue, it’s probably because your global @angular/cli , project @angular/cli version or @angular/compiler-cli doesn’t match.

Debug

First of all run

ng -v

to check the global version (i.e it outputs 5.2.0) and then look into your project package.json, if it match with the project versions.

...
"@angular/cli": "6.0.0-rc.3",
"@angular/compiler-cli": "^5.2.0",
...

Fix it

If something doesn’t match, update or downgrade it. For example to downgrade project @angular/cli run

npm uninstall -D @angular/cli
npm install -D @angular/cli@5.2.0

To upgrade global run @angular/cli run

npm install -g @angular/cli@latest

Note

It is necessary to have both a global and local install for the tools to work.

In global mode (-g or –global appended to the command), it uninstalls/installs the package as a global package. To uninstall/install the project package use -D or –save-dev and package will be removed/added to your devDependencies.

The @ after package name specifies the desired version.

Related Post

Convert HEIC to JPG on Right Click for Free Convert HEIC to JPG on Right-Click In iOS 11 Apple is replacing the JPEG image format with the new HEIC alternative. But what to do when device or p...
FREE ePub Quicklook and Spotlight Plugins for Mac ... When you have a lot of ePub books, it can be useful to see excerpt and meta data information in quicklook. Even more important...
Free Better Battery Stats and Time Remaining for M... Better Battery Stats and Time Remaining for Mac OS TL;DR; Do you miss the time remaining indicator on your MacBook, MacBook Air, or MacBook Pro? He...
Translate Selected Text to English on Right Click ... TL;DR; Need instant translation right in context menu? You can accomplish it for free with one line of code in Automator, or you can proc...
Convert HEIC to PNG on Right Click for Free Convert HEIC to PNG on Right-Click In iOS 11 Apple is replacing the PNG image format with the new HEIC alternative. But what to do when device or pr...
PPTP VPN on MAC OS X Sierra, High Sierra and Mojav... PPTP VPN for Mac OS X Introduction PPTP VPN is no longer supported on macOS Sierra and High Sierra and that is just fine, because there are some se...
Buy me a coffeeOut of coffee 😱, please help!