Data path "" must NOT have additional properties(standalone) angular 14

823 Views Asked by At

when I try to generate a new component this error appears:-

Schematic input does not validate against the Schema: {"style":"css","name":"kdsf","path":"src/app/talentManager","project":"Belbio","displayBlock":false,"inlineStyle":false,"inlineTemplate":false,"standalone":false,"changeDetection":"Default","type":"Component","skipTests":true,"flat":false,"skipImport":false,"skipSelector":false,"export":false} Errors:

Data path "" must NOT have additional properties(standalone).

--angular.json file include:

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "Belbio": {
      "projectType": "application",
      "schematics": {
        "@schematics/angular:application": {
          "strict": true
        },
        "@schematics/angular:component": {
          "style": "scss"
        }
      },
      "root": "",
      "sourceRoot": "src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "allowedCommonJsDependencies": [
              "lodash"
            ],
            "assets": [
              "src/favicon.ico",
              "src/assets",
              "src/manifest.webmanifest"
            ],
            "index": "src/index.html",
            "main": "src/main.ts",
            "outputPath": "dist/",
            "polyfills": "src/polyfills.ts",
            "inlineStyleLanguage": "scss",
            "scripts": [
              "node_modules/jquery/dist/jquery.min.js",
              {
                "bundleName": "generalJS",
                "inject": true,
                "input": "src/assets/general.js"
              }
            ],
            "serviceWorker": true,
            "styles": [
              "node_modules/bootstrap/dist/css/bootstrap.min.css",
              "node_modules/primeng/resources/themes/saga-blue/theme.css",
              "node_modules/primeng/resources/primeng.min.css",
              "node_modules/primeicons/primeicons.css",
              "node_modules/ngx-toastr/toastr.css",
              "src/styles.scss",
              {
                "bundleName": "sharedTemplateSCSS",
                "inject": false,
                "input": "src/assets/styles/sharedTemplate.scss"
              },
              {
                "bundleName": "arabicV",
                "inject": true,
                "input": "src/assets/styles/arabicV.scss"
              }
            ],
            "tsConfig": "tsconfig.app.json"
          },
          "configurations": {
            "production": {
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                }
              ],
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "outputHashing": "all",
              "optimization": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": true,
              "buildOptimizer": true,
              "deleteOutputPath": true,
              "serviceWorker": true,
              "ngswConfigPath": "ngsw-config.json"
            },
            "development": {
              "buildOptimizer": false,
              "optimization": false,
              "vendorChunk": false,
              "extractLicenses": false,
              "sourceMap": {
                "scripts": true,
                "styles": true,
                "vendor": true,
                "hidden": true
              },
              "namedChunks": false
            }
          },
          "defaultConfiguration": "production"
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "configurations": {
            "production": {
              "browserTarget": "Belbio:build:production",
              "proxyConfig": "src/proxy.conf.json"
            },
            "development": {
              "browserTarget": "Belbio:build:development"
            }
          },
          "defaultConfiguration": "development",
          "options": {
            "browserTarget": "project-name:build",
            "proxyConfig": "src/proxy.conf.js"
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "Belbio:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.spec.json",
            "karmaConfig": "karma.conf.js",
            "assets": [
              "src/favicon.ico",
              "src/assets",
              "src/manifest.webmanifest"
            ],
            "styles": [
              "src/styles.css"
            ],
            "scripts": []
          }
        },
        "lint": {
          "builder": "@angular-eslint/builder:lint",
          "options": {
            "lintFilePatterns": [
              "src/**/*.ts",
              "src/**/*.html"
            ]
          }
        },
        "cypress-run": {
          "builder": "@cypress/schematic:cypress",
          "options": {
            "devServerTarget": "Belbio:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "Belbio:serve:production"
            }
          }
        },
        "cypress-open": {
          "builder": "@cypress/schematic:cypress",
          "options": {
            "watch": true,
            "headless": false
          }
        },
        "ct": {
          "builder": "@cypress/schematic:cypress",
          "options": {
            "devServerTarget": "Belbio:serve",
            "watch": true,
            "headless": false,
            "testingType": "component"
          },
          "configurations": {
            "development": {
              "devServerTarget": "Belbio:serve:development"
            }
          }
        },
        "e2e": {
          "builder": "@cypress/schematic:cypress",
          "options": {
            "devServerTarget": "Belbio:serve",
            "watch": true,
            "headless": false
          },
          "configurations": {
            "production": {
              "devServerTarget": "Belbio:serve:production"
            }
          }
        }
      }
    }
  },
  "defaultProject": "Belbio",
  "cli": {
    "analytics": "4f69cedd-fdcb-413e-aa01-c300888f149f",
    "schematicCollections": [
      "@cypress/schematic",
      "@angular-eslint/schematics",
      "@schematics/angular"
    ]
  }
}

--package.json file include:

{
  "name": "belbio",
  "version": "1.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "lint": "ng lint",
    "explore": "source-map-explorer dist/**/*.js",
    "build-compress": "ng build && gzipper c ./dist --include js,css,html --output-file-format [filename].[ext] ./dist-compressed/",
    "e2e": "ng e2e",
    "cypress:open": "cypress open",
    "cypress:run": "cypress run"
  },
  "private": true,
  "dependencies": {
    "@abacritt/angularx-social-login": "^1.2.2",
    "@angular-builders/custom-webpack": "^14.0.1",
    "@angular/cdk": "^14.1.0",
    "@angular/common": "~14.2.12",
    "@angular/compiler": "~14.2.12",
    "@angular/core": "~14.2.12",
    "@angular/forms": "~14.2.12",
    "@angular/material": "^14.1.0",
    "@angular/platform-browser": "~14.2.12",
    "@angular/platform-browser-dynamic": "~14.2.12",
    "@angular/platform-server": "~14.2.12",
    "@angular/router": "~14.2.12",
    "@angular/service-worker": "~14.2.12",
    "@fortawesome/angular-fontawesome": "^0.10.2",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@ng-bootstrap/ng-bootstrap": "^12.0.0",
    "@ngx-translate/core": "^14.0.0",
    "@ngx-translate/http-loader": "^7.0.0",
    "@types/google-one-tap": "^1.2.0",
    "angular-credit-cards": "^3.1.8",
    "animate.css": "^4.1.1",
    "animations": "^0.0.0",
    "autoprefixer": "^10.4.8",
    "bootstrap": "^5.1.3",
    "cors": "^2.8.5",
    "creditcardpayments": "^1.0.3",
    "gzipper": "^7.2.0",
    "jquery": "^3.6.1",
    "jwt-decode": "^3.1.2",
    "ngx-bootstrap": "^8.0.0",
    "ngx-cookie-service": "^13.0.1",
    "ngx-paypal": "^9.0.0",
    "ngx-toastr": "^14.2.2",
    "oidc-client": "^1.11.5",
    "powerbi": "^1.0.2",
    "powerbi-client-angular": "^2.0.1",
    "primeng": "^13.2.1",
    "run-script-os": "^1.1.6",
    "rxjs": "^7.5.6",
    "standalone": "^0.0.1",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.2.10",
    "@angular-eslint/builder": "^14.0.2",
    "@angular-eslint/eslint-plugin": "^14.0.2",
    "@angular-eslint/eslint-plugin-template": "^14.0.2",
    "@angular-eslint/schematics": "^14.0.2",
    "@angular-eslint/template-parser": "^14.0.2",
    "@angular/cli": "^14.2.10",
    "@angular/compiler-cli": "~14.2.12",
    "@cypress/schematic": "^2.5.0",
    "@schematics/angular": "^13.3.10",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.8",
    "@types/jquery": "^3.5.14",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "^5.29.0",
    "@typescript-eslint/parser": "^5.29.0",
    "cypress": "^12.4.1",
    "eslint": "^8.18.0",
    "jasmine-core": "~3.8.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "source-map-explorer": "^2.5.3",
    "tslib": "^2.4.0",
    "typescript": "^4.7.4"
  }
}

generate a new component

1

There are 1 best solutions below

0
On

it looks that "@cypress/schematic" in the package.json file was the problem I don't know how it affects generating the component but it does because when I remove it the generating component works fine.