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

theme is producing an error #179

Closed yashjit closed 6 years ago

yashjit commented 6 years ago

I download and placed "nebular/src/framework/theme" in my application rather using distribution"@nebular/theme". I try to customize and change my @nebular/theme path to the "nebular/src/framework/theme" in respective files as listed below -

modified: src/app/@theme/components/header/header.component.ts modified: src/app/@theme/components/theme-switcher/theme-switcher.component.ts modified: src/app/@theme/layouts/sample/sample.layout.ts modified: src/app/@theme/theme.module.ts modified: src/app/auth/auth.module.ts modified: src/app/pages/charts/chartjs/chartjs-bar-horizontal.component.ts modified: src/app/pages/charts/chartjs/chartjs-bar.component.ts modified: src/app/pages/charts/chartjs/chartjs-line.component.ts modified: src/app/pages/charts/chartjs/chartjs-multiple-xaxis.component.ts modified: src/app/pages/charts/chartjs/chartjs-pie.component.ts modified: src/app/pages/charts/chartjs/chartjs-radar.component.ts modified: src/app/pages/charts/d3/d3-advanced-pie.component.ts modified: src/app/pages/charts/d3/d3-area-stack.component.ts modified: src/app/pages/charts/d3/d3-bar.component.ts modified: src/app/pages/charts/d3/d3-line.component.ts modified: src/app/pages/charts/d3/d3-pie.component.ts modified: src/app/pages/charts/d3/d3-polar.component.ts modified: src/app/pages/charts/echarts/echarts-area-stack.component.ts modified: src/app/pages/charts/echarts/echarts-bar-animation.component.ts modified: src/app/pages/charts/echarts/echarts-bar.component.ts modified: src/app/pages/charts/echarts/echarts-line.component.ts modified: src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts modified: src/app/pages/charts/echarts/echarts-pie.component.ts modified: src/app/pages/charts/echarts/echarts-radar.component.ts modified: src/app/pages/dashboard/contacts/contacts.component.ts modified: src/app/pages/dashboard/electricity/electricity-chart/electricity-chart.component.ts modified: src/app/pages/dashboard/electricity/electricity.component.ts modified: src/app/pages/dashboard/kitten/kitten.component.ts modified: src/app/pages/dashboard/rooms/rooms.component.ts modified: src/app/pages/dashboard/solar/solar.component.ts modified: src/app/pages/dashboard/temperature/temperature.component.ts modified: src/app/pages/dashboard/traffic/traffic-chart.component.ts modified: src/app/pages/dashboard/traffic/traffic.component.ts modified: src/app/pages/maps/bubble/bubble-map.component.ts modified: src/app/pages/pages-menu.ts modified: src/app/pages/ui-features/buttons/hero-buttons/hero-buttons.component.ts modified: src/app/pages/ui-features/typography/typography.component.ts

It produce me error --------------

ERROR in src/app/nb/framework/theme/components/menu/menu.service.ts(128,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; item: NbMenuItem; }>'. Type '{}' is not assignable to type '{ tag: string; item: NbMenuItem; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(132,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; item: NbMenuItem; }>'. Type '{}' is not assignable to type '{ tag: string; item: NbMenuItem; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(136,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; item: NbMenuItem; }>'. Type '{}' is not assignable to type '{ tag: string; item: NbMenuItem; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(140,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; item: NbMenuItem; }>'. Type '{}' is not assignable to type '{ tag: string; item: NbMenuItem; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(170,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; items: NbMenuItem[]; }>'. Type '{}' is not assignable to type '{ tag: string; items: NbMenuItem[]; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(174,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; }>'. Type '{}' is not assignable to type '{ tag: string; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/menu/menu.service.ts(178,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; listener: BehaviorSubject<{ tag: string; item: NbMenuItem; }>; }>'. Type '{}' is not assignable to type '{ tag: string; listener: BehaviorSubject<{ tag: string; item: NbMenuItem; }>; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/search/search.service.ts(53,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ searchType: string; tag?: string; }>'. Type '{}' is not assignable to type '{ searchType: string; tag?: string; }'. Property 'searchType' is missing in type '{}'. src/app/nb/framework/theme/components/search/search.service.ts(61,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ searchType: string; tag?: string; }>'. Type '{}' is not assignable to type '{ searchType: string; tag?: string; }'. Property 'searchType' is missing in type '{}'. src/app/nb/framework/theme/components/search/search.service.ts(69,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ term: string; tag?: string; }>'. Type '{}' is not assignable to type '{ term: string; tag?: string; }'. Property 'term' is missing in type '{}'. src/app/nb/framework/theme/components/sidebar/sidebar.service.ts(30,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ compact: boolean; tag: string; }>'. Type '{}' is not assignable to type '{ compact: boolean; tag: string; }'. Property 'compact' is missing in type '{}'. src/app/nb/framework/theme/components/sidebar/sidebar.service.ts(38,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; }>'. Type '{}' is not assignable to type '{ tag: string; }'. Property 'tag' is missing in type '{}'. src/app/nb/framework/theme/components/sidebar/sidebar.service.ts(46,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<{ tag: string; }>'. Type '{}' is not assignable to type '{ tag: string; }'. Property 'tag' is missing in type '{}'.

webpack: Failed to compile.


My package.json ---------- { "name": "ngx-admin", "version": "2.0.2", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/akveo/ngx-admin.git" }, "bugs": { "url": "https://github.com/akveo/ngx-admin/issues" }, "scripts": { "ng": "ng", "conventional-changelog": "conventional-changelog", "start": "ng serve --host 0.0.0.0 --port 5100", "build": "ng build", "build:prod": "npm run build -- --prod --aot", "test": "ng test -sr", "test:coverage": "rimraf coverage && npm run test -- -cc", "lint": "ng lint --type-check", "lint:fix": "ng lint --fix", "lint:styles": "stylelint ./src/*/.scss", "lint:ci": "npm run lint && npm run lint:styles", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "ng e2e", "docs": "compodoc -p src/tsconfig.app.json -d docs", "docs:serve": "compodoc -p src/tsconfig.app.json -d docs -s", "prepush": "npm run lint:ci", "release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s" }, "dependencies": { "@agm/core": "1.0.0-beta.2", "@angular/animations": "~5.1.0", "@angular/common": "~5.1.0", "@angular/compiler": "~5.1.0", "@angular/core": "~5.1.0", "@angular/forms": "~5.1.0", "@angular/http": "~5.1.0", "@angular/platform-browser": "~5.1.0", "@angular/platform-browser-dynamic": "~5.1.0", "@angular/router": "~5.1.0", "@asymmetrik/ngx-leaflet": "3.0.1", "@nebular/auth": "2.0.0-rc.4", "@nebular/theme": "2.0.0-rc.4", "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.8", "@swimlane/ngx-charts": "7.0.1", "@types/toastr": "^2.1.35", "amexio-ng-extensions": "^3.2.2", "angular2-chartjs": "0.4.1", "angular2-toaster": "4.0.1", "bootstrap": "4.0.0-beta.2", "chart.js": "2.7.1", "ckeditor": "4.7.3", "classlist.js": "1.1.20150312", "core-js": "2.5.1", "font-awesome": "4.7.0", "intl": "1.2.5", "ionicons": "2.0.1", "jquery": "^3.2.1", "leaflet": "1.2.0", "nebular-icons": "1.0.6", "ng2-ckeditor": "1.1.13", "ng2-smart-table": "1.2.2", "ng2-tree": "2.0.0-rc.4", "ngx-echarts": "2.0.0", "normalize.css": "6.0.0", "pace-js": "1.0.2", "popper.js": "^1.12.9", "roboto-fontface": "0.8.0", "rxjs": "5.5.5", "tether": "^1.4.3", "tinymce": "4.5.7", "toastr": "^2.1.4", "typeface-exo": "0.0.22", "web-animations-js": "2.2.5", "zone.js": "0.8.18" }, "devDependencies": { "@angular/cli": "1.6.3", "@angular/compiler-cli": "~5.1.0", "@angular/language-service": "~5.1.0", "@compodoc/compodoc": "1.0.1", "@types/d3-color": "1.0.5", "@types/jasmine": "2.5.54", "@types/jasminewd2": "2.0.3", "@types/leaflet": "1.2.3", "@types/node": "6.0.90", "codelyzer": "4.0.2", "conventional-changelog-cli": "1.3.4", "husky": "0.13.3", "jasmine-core": "2.6.4", "jasmine-spec-reporter": "4.1.1", "karma": "1.7.1", "karma-chrome-launcher": "2.1.1", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "npm-run-all": "4.0.2", "protractor": "5.1.2", "rimraf": "2.6.1", "stylelint": "7.13.0", "ts-node": "3.2.2", "tslint": "5.7.0", "tslint-language-service": "0.9.6", "typescript": "2.5.3" }

please guide how to resolve

yashjit commented 6 years ago

With latest version of nebular it works !