Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I started getting "export was not found in '@angular/core' " after uninstalling then reinstalling a package

I have a project which was working perfectly except for some minor error when using @nebular and angular material's dialog and pagination so I thought I might fix it if i uninstall then reinstall those packages but I got an even worse error and my project doesn't work anymore.

I even tried updating typescript and uninstalling those packages but i'm still getting this error

Here's the error:

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 5042:68-86 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1026:41-59 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:46-64 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js 195:57-75 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js 38:65-83 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 2338:55-73 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 663:58-76 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2956:54-72 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 2338:38-56 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js 91:56-74 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:55-73 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js 102:50-68 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2038:58-76 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 527:63-81 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 1361:62-80 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 456:55-73 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 4167:64-82 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 930:58-76 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 824:67-85 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/collections.es5.js 524:67-85 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 824:181-189 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 930:154-162 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 527:222-230 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 4167:172-180 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 4167:197-205 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 4167:217-225 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 4167:237-245 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1026:141-149 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 5042:184-192 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 527:197-205 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 456:145-153 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 527:169-177 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 1361:166-174 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/platform.es5.js 102:130-138 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2038:154-162 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2038:186-194 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2038:204-212 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/overlay.es5.js 527:240-248 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:145-153 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:188-196 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:206-214 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:226-234 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:271-279 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2956:142-150 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2956:160-168 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:253-261 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 663:154-162 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 663:172-180 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:219-227 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 2338:145-153 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/scrolling.es5.js 2338:165-173 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:189-197 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@nebular/theme/fesm5/index.js 1771:156-164 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/observers.es5.js 195:151-159 "export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/bidi.es5.js 91:148-156 "export 'ɵɵinject' was not found in '@angular/core'

Here's my package.json:

{
  "name": "star-admin-angular",
  "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-devkit/build-angular": "^0.12.4",
   "@angular/animations": "^6.1.0",
   "@angular/cdk": "^8.0.0",
   "@angular/common": "^6.1.0",
   "@angular/compiler": "^6.1.0",
   "@angular/core": "^6.1.0",
   "@angular/forms": "^6.1.0",
   "@angular/http": "^6.1.0",
   "@angular/material": "^8.0.0",
   "@angular/platform-browser": "^6.1.0",
   "@angular/platform-browser-dynamic": "^6.1.0",
   "@angular/router": "^6.1.0",
   "@nebular/auth": "^4.0.0",
   "@nebular/bootstrap": "^4.0.0",
   "@nebular/security": "^4.0.0",
   "@nebular/theme": "^4.0.0",
   "@ng-bootstrap/ng-bootstrap": "^3.3.0",
   "bootstrap": "^4.3.1",
   "compass-mixins": "^0.12.10",
   "core-js": "^2.5.4",
   "font-awesome": "^4.7.0",
   "mdi": "^2.2.43",
   "rxjs": "~6.2.0",
   "rxjs-compat": "^6.3.3",
   "zone.js": "~0.8.26"
 },
 "devDependencies": {
"@angular/cli": "~6.2.5",
"@angular/compiler-cli": "^6.1.0",
"@angular/language-service": "^6.1.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.3.0",
"file-loader": "^2.0.0",
"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.0",
"sass-loader": "^7.1.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~2.9.2"
}
}
like image 967
i'mgnome Avatar asked Jun 05 '19 10:06

i'mgnome


1 Answers

"@angular/cdk": "^8.0.0", should be changed to a version matching the version of angular you are running.

Should be ^6.x.x or ^7.x.x

I think ^8.x.x only works with angular 8.

like image 194
Michael Avatar answered Oct 21 '22 18:10

Michael