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

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...
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...
MacBook wifi issue – OS X keeps reconnecting Last few weeks I was facing annoying wifi problems. My mac was reconnecting every 5 minutes. On top of that BSSID was reseting so I saw BSSID changing...
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...
Right-Click to Translate (Look Up) with Google Tra... If you are not native english speaker, you may be frustrated with default "look up" options you get after selecting a text and right clicking. There a...
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...
Buy me a coffeeOut of coffee 😱, please help!