Error when executing Angular project

Asked

Viewed 165 times

-1

I’m trying to run an Angular application in my development environment, but I’m going through some problems. I cloned the project repository, ran npm install, and when running an ng serves, the project simply does not open in the browser, returning me the Cannot GET/error, and on my console I have received several errors. I believe that the problem lies in the structuring of project folders, but I’ve already made several changes, I searched the internet how to do, and no positive results so far, follow the structure prints and the structure codes.

My angular.json file

{
  "$schema": "node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "ngx-admin-demo": {
    "root": "",
    "sourceRoot": "src",
    "projectType": "application",
  "architect": {
    "build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
        "aot": true,
        "preserveSymlinks": true,
        "rebaseRootRelativeCssUrls": true,
        "outputPath": "dist",
        "index": "src/index.html",
        "main": "src/main.ts",
        "tsConfig": "src/tsconfig.app.json",
        "polyfills": "src/polyfills.ts",
        "assets": [
          "src/assets",
          "src/favicon.ico",
          "src/favicon.png",
          {
            "glob": "**/*",
            "input": "node_modules/leaflet/dist/images",
            "output": "/assets/img/markers"
          }
        ],
        "styles": [
          "node_modules/bootstrap/dist/css/bootstrap.css",
          "node_modules/typeface-exo/index.css",
          "node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
          "node_modules/ionicons/scss/ionicons.scss",
          "node_modules/@fortawesome/fontawesome-free/css/all.css",
          "node_modules/socicon/css/socicon.css",
          "node_modules/nebular-icons/scss/nebular-icons.scss",
          "node_modules/pace-js/templates/pace-theme-flash.tmpl.css",
          "node_modules/leaflet/dist/leaflet.css",
          "src/app/@theme/styles/styles.scss"
        ],
        "scripts": [
          "node_modules/pace-js/pace.min.js",
          "node_modules/tinymce/tinymce.min.js",
          "node_modules/tinymce/themes/silver/theme.min.js",
          "node_modules/tinymce/plugins/link/plugin.min.js",
          "node_modules/tinymce/plugins/paste/plugin.min.js",
          "node_modules/tinymce/plugins/table/plugin.min.js",
          "node_modules/echarts/dist/echarts.min.js",
          "node_modules/echarts/dist/extension/bmap.min.js",
          "node_modules/chart.js/dist/Chart.min.js"
        ]
      },
      "configurations": {
        "production": {
          "budgets": [
            {
              "type": "anyComponentStyle",
              "maximumWarning": "6kb"
            }
          ],
          "optimization": true,
          "outputHashing": "all",
          "sourceMap": false,
          "extractCss": true,
          "namedChunks": false,
          "aot": true,
          "extractLicenses": true,
          "vendorChunk": false,
          "buildOptimizer": true,
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ]
        }
      }
    },
    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "browserTarget": "ngx-admin-demo:build"
      },
      "configurations": {
        "production": {
          "browserTarget": "ngx-admin-demo:build:production"
        }
      }
    },
    "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
        "browserTarget": "ngx-admin-demo:build"
      }
    },
    "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
        "main": "src/test.ts",
        "karmaConfig": "./karma.conf.js",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "src/tsconfig.spec.json",
        "scripts": [
          "node_modules/pace-js/pace.min.js",
          "node_modules/tinymce/tinymce.min.js",
          "node_modules/tinymce/themes/silver/theme.min.js",
          "node_modules/tinymce/plugins/link/plugin.min.js",
          "node_modules/tinymce/plugins/paste/plugin.min.js",
          "node_modules/tinymce/plugins/table/plugin.min.js",
          "node_modules/echarts/dist/echarts.min.js",
          "node_modules/echarts/dist/extension/bmap.min.js",
          "node_modules/chart.js/dist/Chart.min.js"
        ],
        "styles": [
          "node_modules/bootstrap/dist/css/bootstrap.css",
          "node_modules/typeface-exo/index.css",
          "node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
          "node_modules/ionicons/scss/ionicons.scss",
          "node_modules/font-awesome/scss/font-awesome.scss",
          "node_modules/socicon/css/socicon.css",
          "node_modules/nebular-icons/scss/nebular-icons.scss",
          "node_modules/pace-js/templates/pace-theme-flash.tmpl.css",
          "src/app/@theme/styles/styles.scss"
        ],
        "assets": [
          "src/assets",
          "src/favicon.ico",
          "src/favicon.png",
          {
            "glob": "**/*",
            "input": "node_modules/leaflet/dist/images",
            "output": "/assets/img/markers"
          }
        ]
      }
    },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "src/tsconfig.app.json",
          "src/tsconfig.spec.json"
        ],
        "typeCheck": true,
        "exclude": []
      }
    }
  }
},
"ngx-admin-demo-e2e": {
  "root": "",
  "sourceRoot": "",
  "projectType": "application",
  "architect": {
    "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
        "protractorConfig": "./protractor.conf.js",
        "devServerTarget": "ngx-admin-demo:serve"
      }
    },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "e2e/tsconfig.e2e.json"
        ],
        "exclude": []
      }
    }
  }
}
},
"defaultProject": "ngx-admin-demo",
"schematics": {
  "@schematics/angular:component": {
  "prefix": "ngx",
  "style": "scss"
},
"@schematics/angular:directive": {
  "prefix": "ngx"
}
},
"cli": {
"analytics": "cba96cbd-ba0e-4397-94dc-95e78f3503d4"
}
}

Below the print of my design structure and console error...

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

1 answer

-1

Can’t bind to Since it isn’t a known Property of

It usually occurs when you forget to import the module that contains the component or directory you are trying to use.

As to Can’t resolve in

You should check all your Miles and also baseUrl in tscofig.json

Browser other questions tagged

You are not signed in. Login or sign up in order to post.