Angular: Webpack has been initialised using a Configuration Object that does not match the API schem

Asked

Viewed 119 times

-1

I started having this error in my app at Angular 7, already tried to remove module folder, install, remove cache and nothing, the error remains.

Invalid Configuration Object. Webpack has been initialised using a Configuration Object that does not match the API schema. - Configuration.entry should be one of These: Function | Object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] -> The entry point(s) of the Compilation. Details: * Configuration.entry should be an instance of Function -> A Function returning an entry Object, an entry string, an entry array or a Promise to These Things. * Configuration.entry['Styles'] should be a string. -> The string is resolved to a module which is Loaded upon startup. * Configuration.entry['Styles'] should not contain the item 'C: Users smoreira Documents official projects doc-Translator-front node_modules angular-bootstrap-Md scss mdb-free.scss' Twice. * Configuration.entry should be a string. -> An entry point without name. The string is resolved to a module which is Loaded upon startup. * Configuration.entry should be an array: [non-empty string] Webpackoptionsvalidationerror: Invalid Configuration Object. Webpack has been initialised using a Configuration Object that does not match the API schema. - Configuration.entry should be one of These: Function | Object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] -> The entry point(s) of the Compilation. Details: * Configuration.entry should be an instance of Function -> A Function returning an entry Object, an entry string, an entry array or a Promise to These Things. * Configuration.entry['Styles'] should be a string. -> The string is resolved to a module which is Loaded upon startup. * Configuration.entry['Styles'] should not contain the item 'C: Users smoreira Documents official projects doc-Translator-front node_modules angular-bootstrap-Md scss mdb-free.scss' Twice. * Configuration.entry should be a string. -> An entry point without name. The string is resolved to a module which is Loaded upon startup. * Configuration.entry should be an array: [non-empty string] at webpack (C: Users smoreira Documents official projects doc-Translator-front node_modules webpack lib webpack.js:31:9) At observable.rxjs_1.Observable.Obs [as _subscribe] (C: Users smoreira Documents official projects doc-Translator-front node_modules@angular-devkit build-webpack src webpack-dev-server index.js:37:37) At observable. _trySubscribe (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Observable.js:44:25) At Observable.subscribe (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Observable.js:30:22) at C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal util subscribTo.js:22:31 at Object.subscribToResult (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal util subscribeToResult.js:10:45) At Mergemapsubscriber. _innerSub (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators mergeMap.js:82:29) At Mergemapsubscriber. _tryNext (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators mergeMap.js:76:14) At Mergemapsubscriber. _next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators mergeMap.js:59:18) At Mergemapsubscriber.Subscriber.next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Subscriber.js:67:18) At Tapsubscriber. _next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators tap.js:65:26) At Tapsubscriber.Subscriber.next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Subscriber.js:67:18) At Mergemapsubscriber.notifyNext (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators mergeMap.js:92:26) At Innersubscriber. _next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Innersubscriber.js:28:21) At Innersubscriber.Subscriber.next (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Subscriber.js:67:18) At Mergemapsubscriber.notifyNext (C: Users smoreira Documents official projects doc-Translator-front node_modules rxjs Internal Operators mergeMap.js:92:26)

package json.

{
  "name": "translate-doc-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~7.0.0",
    "@angular/common": "~7.0.0",
    "@angular/compiler": "~7.0.0",
    "@angular/core": "~7.0.0",
    "@angular/forms": "~7.0.0",
    "@angular/http": "~7.0.0",
    "@angular/platform-browser": "~7.0.0",
    "@angular/platform-browser-dynamic": "~7.0.0",
    "@angular/router": "~7.0.0",
    "@ng-bootstrap/ng-bootstrap": "^4.0.1",
    "@ng-select/ng-select": "^2.13.3",
    "@types/chart.js": "^2.7.40",
    "@webpack-cli/init": "^0.1.3",
    "angular-bootstrap-checkbox": "^0.5.0",
    "angular-bootstrap-md": "^7.1.1",
    "angular-dropdown-component": "^1.0.8",
    "bootstrap": "^4.2.1",
    "chart.js": "^2.7.2",
    "core-js": "^2.6.1",
    "font-awesome": "^4.7.0",
    "hammerjs": "~2.0.8",
    "ngx6-breadcrumbs": "0.0.2",
    "rxjs": "~6.3.3",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.11.4",
    "@angular/cli": "~7.0.6",
    "@angular/compiler-cli": "~7.0.0",
    "@angular/language-service": "~7.0.0",
    "@babel/core": "^7.2.2",
    "@babel/preset-env": "^7.3.1",
    "@types/jasmine": "^2.8.14",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "babel-loader": "^8.0.5",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "codelyzer": "~4.5.0",
    "css-loader": "^2.1.0",
    "install": "^0.12.2",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.2",
    "style-loader": "^0.23.1",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.1.6",
    "uglifyjs-webpack-plugin": "^2.1.1",
    "webpack-cli": "^3.2.1"
  }
}

I appreciate contributions

  • hello, would you have this code on github? Or would you have the webpack.config.js file available in the question, please?

  • hello, I put package.json there

1 answer

1


The solution was to remove the entire project, create a new one, and add the dependencies one by one.

Browser other questions tagged

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