'I am getting WARNING in ./node_modules/@coreui/angular/fesm5/coreui-angular.js 493:33-51 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

I am facing warning at ng serve command and for this warning, I can't see anything in the web page. We are using Core Ui Pro Admin Template.

Full Warning message list:

WARNING in ./node_modules/@coreui/angular/fesm5/coreui-angular.js 493:33-51
"export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@coreui/angular/fesm5/coreui-angular.js 816:30-48
"export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@coreui/angular/fesm5/coreui-angular.js 493:137-145
"export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@coreui/angular/fesm5/coreui-angular.js 493:155-163
"export 'ɵɵinject' was not found in '@angular/core'

My ng version:

Angular CLI: 7.3.9
Node: 10.16.3
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.9
@angular-devkit/build-angular     0.13.9
@angular-devkit/build-optimizer   0.13.9
@angular-devkit/build-webpack     0.13.9
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cli                      7.3.9
@ngtools/webpack                  7.3.9
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.5.4
typescript                        3.1.6
webpack                           4.29.0

package.json file:

{
  "name": "@coreui/coreui-pro-angular-admin-template-starter",
  "version": "2.2.0",
  "description": "CoreUI Pro Angular 2+ Admin Template",
  "author": {
    "name": "Łukasz Holeczek",
    "url": "http://holeczek.pl",
    "github": "https://github.com/mrholek",
    "twitter": "https://twitter.com/lukaszholeczek"
  },
  "contributors": [
    {
      "name": "Andrzej Kopański",
      "url": "https://github.com/xidedix"
    }
  ],
  "homepage": "https://coreui.io/pro/angular",
  "copyright": "Copyright 2018 creativeLabs Łukasz Holeczek",
  "license": "https://coreui.io/pro/license/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.5",
    "@amcharts/amcharts4": "^4.6.0",
    "@angular/animations": "^7.1.1",
    "@angular/common": "^7.1.1",
    "@angular/compiler": "^7.1.1",
    "@angular/core": "^7.1.1",
    "@angular/forms": "^7.1.1",
    "@angular/http": "^7.1.1",
    "@angular/platform-browser": "^7.1.1",
    "@angular/platform-browser-dynamic": "^7.1.1",
    "@angular/router": "^7.1.1",
    "@coreui/angular": "^2.2.0",
    "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
    "@coreui/coreui-pro": "^2.1.3",
    "@coreui/icons": "0.3.0",
    "@ng-bootstrap/ng-bootstrap": "^4.1.1",
    "@ngrx/effects": "^7.4.0",
    "@ngrx/entity": "^7.4.0",
    "@ngrx/store": "^7.4.0",
    "@ngrx/store-devtools": "^7.4.0",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "@types/lodash": "^4.14.144",
    "@types/number-to-words": "^1.2.0",
    "angular-bootstrap-md": "^8.1.1",
    "angular-calendar": "^0.26.4",
    "angular-datatables": "^6.0.0",
    "angular-in-memory-web-api": "^0.8.0",
    "angular2-datatable": "^0.6.0",
    "angular2-ladda": "^2.0.0",
    "angular2-text-mask": "^9.0.0",
    "angular2-toaster": "^7.0.0",
    "bootstrap": "^4.1.3",
    "chart.js": "2.7.3",
    "core-js": "^2.5.7",
    "datatables.net": "^1.10.19",
    "datatables.net-dt": "^1.10.19",
    "date-fns": "^1.29.0",
    "flag-icon-css": "3.2.1",
    "font-awesome": "^4.7.0",
    "jquery": "^3.3.1",
    "lodash": "^4.17.15",
    "moment": "^2.22.2",
    "mutationobserver-shim": "^0.3.2",
    "ng-select": "^1.0.1",
    "ng2-ace-editor": "^0.3.8",
    "ng2-charts": "^1.6.0",
    "ng2-dragula": "^1.5.0",
    "ngrxstoredata": "^2.0.0",
    "ngx-bootstrap": "^3.1.2",
    "ngx-bootstrap-modal": "^2.0.1",
    "ngx-json-viewer": "^2.4.0",
    "ngx-pagination": "^4.1.0",
    "ngx-perfect-scrollbar": "^7.1.0",
    "ngx-quill": "^4.3.3",
    "ngx-ui-loader": "^7.2.2",
    "number-to-words": "^1.2.4",
    "quill": "^1.3.6",
    "rxjs": "^6.4.0",
    "rxjs-compat": "^6.3.3",
    "simple-line-icons": "^2.4.1",
    "spinkit": "^1.2.5",
    "ts-helpers": "^1.1.2",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.8",
    "@angular/cli": "^7.3.6",
    "@angular/compiler-cli": "^7.1.1",
    "@angular/language-service": "^7.1.1",
    "@ngrx/schematics": "^7.4.0",
    "@types/datatables.net": "^1.10.17",
    "@types/jasmine": "^3.3.0",
    "@types/jasminewd2": "^2.0.6",
    "@types/jquery": "^3.3.29",
    "@types/node": "^10.12.11",
    "codelyzer": "^4.5.0",
    "jasmine-core": "^2.99.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^4.0.1",
    "karma-chrome-launcher": "^2.2.0",
    "karma-coverage-istanbul-reporter": "^2.0.4",
    "karma-jasmine": "^2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "node-sass": "^4.12.0",
    "protractor": "^5.4.1",
    "ts-node": "^7.0.1",
    "tslint": "^5.11.0",
    "typescript": "3.1.x"
  },
  "engines": {
    "node": ">= 8.9.4",
    "npm": ">= 5.6.0"
  }
}


Solution 1:[1]

  1. Removed circumflex(^) from the package.json to avoid version conflict.
  2. Deleted the node modules folder
  3. yarn install --force

Now it's working fine :)

Solution 2:[2]

yes, thank you Mailton Marma today "@coreui/angular": "^2.11.2", it auto update "@coreui/angular": "^2.13.0" in package.lock. it lead to version conflict. I remove circumflex(^) and it work again

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Milton Marma
Solution 2 Loc Giang