I am getting below error in angular.json
file , where schema is not loading properly, getting error unable to load schema, first line of below code giving me error, see below
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"mrr": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
both angular.json
and node_modules
is in the same level.
Hi Abhishek is a problem related to Angular 9 or Node 12 i had the same issue i had the same issue so i rollback to node 11 and angular 8 and everything is fine
[Update] i update angular and node and everything is fine the problem is solved in 9.1.6 you can check the issue on github https://github.com/angular/angular/issues/35154
Steps i follow
npm cache clean
npm install -g @angular/cli
If you are having trouble with npm install, use the -verbose option to see more details.
ng update
This will fix this error.
I got this in VSCode when I accidentally started it without first running "npm install" in an Angular project after restructuring my work directory and wiping out some node_modules directories in the process to avoid time-consuming copy operations.
Naturally, when I got the error I didn't even bother to check if node_modules was there, I "just knew" that it was. (I had in fact already run "npm install" in all but that one project directory.)
After closing VSCode, running "npm install" in the Angular project directory and starting VSCode again, the error went away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With