akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

I started getting ./node_modules/@nebular/theme/fesm5/index.js 1026:41-59 "export 'ɵɵdefineInjectable' was not found in '@angular/core' after reinstalling @nebular in my project #1581

Closed mikewakawski closed 5 years ago

mikewakawski commented 5 years ago

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/@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/@nebular/theme/fesm5/index.js 2338:38-56 "export 'ɵɵdefineInjectable' 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/@nebular/theme/fesm5/index.js 1771:271-279 "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'

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" } }`

nnixaa commented 5 years ago

As I see it, you have a lot of compatibility issues. First, you use Nebular 4 with Angular 6, but Nebular 4 only supports Angular 8. Next, you have Angular CDK 8 && Material 8, again with Angular 6, when they work only with Angular 8.

I suggest updating the whole project to Angular 8 first.

nnixaa commented 5 years ago

Closing as it seems to be an issue outside of Neublar.

pdelorme commented 5 years ago

I'm getting the same result as @mikewakawski with nebular 3.6.0 and up. It is working ok with nebular ~3.5.0. Here is my conf :

  "dependencies": {
    "@agm/core": "^1.0.0-beta.6",
    "@angular/animations": "^7.2.15",
    "@angular/cdk": "^7.3.7",
    "@angular/common": "^7.2.15",
    "@angular/compiler": "^7.2.15",
    "@angular/core": "^7.2.15",
    "@angular/forms": "^7.2.15",
    "@angular/http": "^7.2.15",
    "@angular/platform-browser": "^7.2.15",
    "@angular/platform-browser-dynamic": "^7.2.15",
    "@angular/router": "^7.2.15",
    "@asymmetrik/ngx-leaflet": "3.0.1",
    "@auth0/angular-jwt": "^2.0.0",
    "@nebular/auth": "3.6.0",
    "@nebular/bootstrap": "3.6.0",
    "@nebular/date-fns": "3.6.0",
    "@nebular/security": "3.6.0",
    "@nebular/theme": "3.6.0",
    "@ng-bootstrap/ng-bootstrap": "^4.2.1",
    "@ng-select/ng-select": "^2.20.0",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "@swimlane/ngx-charts": "^10.0.0",
    "angular-font-awesome": "^3.1.2",
    "angular-tree-component": "7.2.0",
    "angular2-chartjs": "0.4.1",
    "bootstrap": "^4.3.0",
    "chart.js": "2.7.1",
    "ckeditor": "4.7.3",
    "classlist.js": "1.1.20150312",
    "date-fns": "^1.30.1",
    "echarts": "^4.2.1",
    "font-awesome": "^4.7.0",
    "intl": "1.2.5",
    "ionicons": "^4.5.8",
    "jwt-decode": "^2.2.0",
    "leaflet": "1.2.0",
    "nebular-icons": "^1.1.0",
    "ng2-eonasdan-datetimepicker": "^0.1.4",
    "ng2-pdf-viewer": "^5.3.2",
    "ngx-echarts": "^4.2.1",
    "normalize.css": "6.0.0",
    "pace-js": "1.0.2",
    "popper.js": "^1.15.0",
    "roboto-fontface": "0.8.0",
    "rxjs": "^6.5.2",
    "rxjs-compat": "^6.5.2",
    "socicon": "3.0.5",
    "tether": "1.4.0",
    "typeface-exo": "0.0.22",
    "web-animations-js": "2.2.5",
    "zone.js": "^0.8.26"
  }

Error message is :

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

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

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

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

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

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

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

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

WARNING in Invalid background value at 14586:14. Ignoring.

ERROR in ./src/app/services/message.service.ts
Module not found: Error: Can't resolve '/builds/neovahub/neovahub/webapp/node_modules/@nebular/theme/components/cdk/overlay/position-helper' in '/builds/neovahub/neovahub/webapp/src/app/services'
ERROR in ./src/app/services/message.service.ts
Module not found: Error: Can't resolve '/builds/neovahub/neovahub/webapp/node_modules/@nebular/theme/components/toastr/model' in '/builds/neovahub/neovahub/webapp/src/app/services'
ERROR in ./src/app/services/login.service.ts
...

please advise. thanks !

pdelorme commented 5 years ago

I guess the reason is there : 3.6.0 BREAKING CHANGES : Angular 8+ now required