1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Package "@angular-builders/custom-webpack" was found but does not support schematics in...

Discussão em 'Angular' iniciado por Naveed Shahid, Setembro 27, 2024.

  1. My angular json

    {
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
    "new_project_mc": {
    "projectType": "application",
    "schematics": {
    "@schematics/angular:component": {
    "style": "scss"
    }
    },
    "root": "",
    "sourceRoot": "src",
    "prefix": "app",
    "architect": {
    "build": {
    "builder": "@angular-builders/custom-webpack:browser",
    "options": {
    "outputPath": "dist/new_project_mc",
    "index": "src/index.html",
    "customWebpackConfig": {
    "path": "./webpack.config.js"
    },
    "polyfills": [
    "zone.js"
    ],
    "tsConfig": "tsconfig.app.json",
    "inlineStyleLanguage": "scss",
    "assets": [
    "src/favicon.ico",
    "src/assets"
    ],
    "styles": [
    "src/styles.scss"
    ],
    "scripts": []
    },
    "configurations": {
    "production": {
    "budgets": [
    {
    "type": "initial",
    "maximumWarning": "500kb",
    "maximumError": "1mb"
    },
    {
    "type": "anyComponentStyle",
    "maximumWarning": "2kb",
    "maximumError": "4kb"
    }
    ],
    "outputHashing": "all"
    },
    "development": {
    "optimization": false,
    "extractLicenses": false,
    "sourceMap": true
    }
    },
    "defaultConfiguration": "production"
    },
    "serve": {
    "builder": "@angular-builders/custom-webpack:dev-server",
    "options": {
    "customWebpackConfig": {
    "path": "./webpack.config.js"
    }
    },
    "configurations": {
    "production": {
    "buildTarget": "new_project_mc:build:production"
    },
    "development": {
    "buildTarget": "new_project_mc:build:development"
    }
    },
    "defaultConfiguration": "development"
    },
    "extract-i18n": {
    "builder": "@angular-devkit/build-angular:extract-i18n",
    "options": {
    "buildTarget": "new_project_mc:build"
    }
    },
    "test": {
    "builder": "@angular-devkit/build-angular:karma",
    "options": {
    "polyfills": [
    "zone.js",
    "zone.js/testing"
    ],
    "tsConfig": "tsconfig.spec.json",
    "inlineStyleLanguage": "scss",
    "assets": [
    "src/favicon.ico",
    "src/assets"
    ],
    "styles": [
    "src/styles.scss"
    ],
    "scripts": []
    }
    }
    }
    }
    },
    "cli": {
    "analytics": false
    }
    }


    My Package JSON

    {
    "name": "new-project-mc",
    "version": "0.0.0",
    "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
    },
    "private": true,
    "dependencies": {
    "@angular-architects/module-federation": "^18.0.4",
    "@angular-builders/custom-webpack": "^17.0.2",
    "@angular/animations": "^17.3.0",
    "@angular/common": "^17.3.0",
    "@angular/compiler": "^17.3.0",
    "@angular/core": "^17.3.0",
    "@angular/forms": "^17.3.0",
    "@angular/platform-browser": "^17.3.0",
    "@angular/platform-browser-dynamic": "^17.3.0",
    "@angular/router": "^17.3.0",
    "node-gyp-build-optional-packages": "^5.2.2",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.14.3"
    },
    "devDependencies": {
    "@angular-devkit/build-angular": "^17.3.4",
    "@angular/cli": "^17.3.4",
    "@angular/compiler-cli": "^17.3.0",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.1.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.4.2"
    }
    }


    I was tried to run my project but it through an error


    Error: Schema validation failed with the following errors:
    Data path "" must NOT have additional properties(customWebpackConfig).
    ​

    MY Angular CLI INFO

    [​IMG]

    Continue reading...

Compartilhe esta Página