angular-builders: [Issue] Data path '' should NOT have additional properties (es5BrowserSupport) with `10.0.0` only

Describe the Bug

I have this error:

Data path '' should NOT have additional properties (es5BrowserSupport)

When serving my Angular 10 application. This is only an issue with the version 10.0.0 of @angular-builders/custom-webpack dependency. Installing the version 9.2.0 of @angular-builders/custom-webpack fix the error.

Expected Behavior

No error and the app start running.

Environment

Libs
- @angular/core version: 10.0.8
- @angular-devkit/build-angular version: 0.1000.5
- @angular-builders/custom-webpack version: 9.2.0

I do not know if you are aware of this error and if not let me know if you need more information about my project.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 32 (6 by maintainers)

Commits related to this issue

Most upvoted comments

What I’ve found in documentation:

Thus, if you use @angular-builders/custom-webpack:dev-server along with @angular-builders/custom-webpack:browser, ng serve will run with custom configuration provided in the latter.

Example angular.json:

"architect": {
  ...
  "build": {
    "builder": "@angular-builders/custom-webpack:browser",
    "options": {
      "customWebpackConfig": {
         "path": "./extra-webpack.config.js"
      },
      ...
    }
  },
  "serve": {
    "builder": "@angular-builders/custom-webpack:dev-server",
    "options": {
      "browserTarget": "my-project:build"
    }
  }

For those struggling with Data path "" should NOT have additional properties(customWebpackConfig).:

Make sure you configure customWebpackConfig with @angular-builders/custom-webpack:browser (and not @angular-builders/custom-webpack:dev-server).

See: custom-webpack-dev-server for more.

I am having the same problem with angular 11 as well. Any solution to this?

@martinsotirov I copied wrong builder, I’m sorry… Please check my updated answer 😃

Basically what I meant is this part here in angular.json is most likely causing you troubles (it was the case in our project):

"serve": {
          "builder": "@angular-builders/custom-webpack:dev-server",
          "options": {
            "customWebpackConfig": { 
              "path": "./webpack.config.js"
            }
          },

Remove customWebpackConfig section and configure it in build target with @angular-devkit/custom-webpack:browser and it should work (at least you won’t be getting those Data path "" should NOT have additional properties(customWebpackConfig). errors anymore)

I’m sorry, I have the same for :

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(allowedCommonJsDependencies).

with package.json:

"@angular-builders/custom-webpack": "10.0.0",
    "@angular-builders/dev-server": "7.3.1",
    "@angular-devkit/build-angular": "0.1000.7",
    "@angular-devkit/build-ng-packagr": "0.1000.7",
    "@angular/animations": "10.0.11",
    "@angular/cdk": "10.1.3",
    "@angular/cli": "10.0.7",
    "@angular/common": "10.0.11",
    "@angular/compiler": "10.0.11",
    "@angular/compiler-cli": "10.0.11",
    "@angular/core": "10.0.11",
    "@angular/forms": "10.0.11",
    "@angular/language-service": "10.0.11",
    "@angular/platform-browser": "10.0.11",
    "@angular/platform-browser-dynamic": "10.0.11",
    "@angular/router": "10.0.11",
    "@commitlint/cli": "9.1.2",
    "@commitlint/config-conventional": "9.1.2",
    "@cypress/code-coverage": "3.8.1",
    "@cypress/webpack-preprocessor": "5.4.4",
    "@istanbuljs/nyc-config-typescript": "1.0.1",
    "@ngx-translate/core": "13.0.0",
    "@semantic-release/git": "9.0.0",
    "@trax-retail/proxy-dev-agent": "1.4.1",
    "@trax-retail/web-components": "1.1.1",
    "@trax-retail/web-standards": "2.0.13",
    "@types/jasmine": "3.5.13",
    "@types/jasminewd2": "2.0.8",
    "@types/node": "14.6.0",
    "codelyzer": "6.0.0",
    "cypress": "5.0.0",
    "husky": "4.2.5",
    "istanbul-instrumenter-loader": "3.0.1",
    "istanbul-lib-coverage": "3.0.0",
    "jasmine-core": "3.6.0",
    "jasmine-spec-reporter": "5.0.2",
    "jssha": "3.1.2",
    "@types/jssha": "2.0.0",
    "jwt-decode": "2.2.0",
    "karma": "5.1.1",
    "karma-chrome-launcher": "3.1.0",
    "karma-coverage-istanbul-reporter": "3.0.3",
    "karma-jasmine": "4.0.1",
    "karma-jasmine-html-reporter": "1.5.4",
    "markdownlint-cli": "0.23.2",
    "nanoid": "3.1.12",
    "ng-lint-report": "0.1.11",
    "ng-packagr": "10.0.4",
    "ngx-cookie-service": "10.0.1",
    "ngx-translate-multi-http-loader": "3.0.0",
    "nyc": "15.1.0",
    "rxjs": "6.6.2",
    "scss-bundle": "3.0.2",
    "source-map-support": "0.5.19",
    "ts-loader": "8.0.3",
    "ts-node": "9.0.0",
    "tslib": "2.0.1",
    "tslint": "6.1.3",
    "typescript": "3.9.7",
    "zone.js": "0.11.1"

If you guys having the above error with 'es5BrowserSupport ’ specified.

At ‘angular.json’ go: projects.ng-complete-guide-update.architect.build.options and delete property" es5BrowserSupport : true"

because Property ‘es5BrowserSupport’ is not allowed

Same problem on Angular 11. Came about because I updated my postcss chain which depends on webpack 5.

Nothing yet? having the same issue

+1

Data path "" should NOT have additional properties(allowedCommonJsDependencies).

package.json

...
 "@angular-builders/custom-webpack": "10.0.0",
 "@angular/cli": "10.0.8",
 "@angular/compiler-cli": "10.0.14",
...

All these cases smell like some versions collision, would you mind running this:

npm list @angular-devkit/build-angular npm list @angular-devkit/architect npm list @angular-devkit/core

And posting the results here?

In my case, the problem was a leftover configuration statement from my previous tslint configuration in angular.json lint options.

Before:

"lint": {
          "builder": "@angular-eslint/builder:lint",
          "options": {
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }

After:

"lint": {
          "builder": "@angular-eslint/builder:lint",
          "options": {
            "lintFilePatterns": [
              "src/**/*.ts",
              "src/**/*.html"
            ]
          }
        }

Look for that property es5BrowserSupport on your angular.json file and remove it.

In general the compiler is telling you that it doesn’t recognize the mentioned property, so in the case of: Data path "" should NOT have additional properties(vendorChunk)., the vendorChunk property is not recognized and should be removed or replaced with a correct value.

@fnnzzz brothers in errors then 🥳

I also tried to downgrade to version 9.2.0, got an error ERROR in Cannot read property 'flags' of undefined

@just-jeb I already tried to remove the package-lock, node_modules and reinstall everything and it did not change a thing. I followed the exact same steps than this comment because it was slightly different from what I did nevertheless the issue is still here 😢

I have a similar case with @angular-builders/custom-webpack:server I get the error “Data path “” should NOT have additional properties(vendorChunk).”

Environment:

"@angular-builders/custom-webpack": "10.0.0"
"@angular/core": 10.0.8
"@angular-devkit/build-angular": "0.1000.5",