mehrabisajad / ng2-datepicker-jalali

datepicker jalali for angular 2
MIT License
21 stars 7 forks source link

has no exported member 'Renderer2 #4

Open behsayah opened 7 years ago

behsayah commented 7 years ago

I installed the package.

Add the following line to the component: import { Component } from "@angular/core";

import { Component } from "@angular/core";

import {NgbDateStruct, NgbCalendar, NgbDatepickerI18n, NgbDatepickerConfig} from '@ng-bootstrap/ng-bootstrap';
import {NgbCalendarPersian} from "ng2-datepicker-jalali/persian/ngb-calendar-persian";
import {NgbDatepickerI18nPersian} from "ng2-datepicker-jalali/persian/ngb-datepicker-i18n-persian";

@Component({
    moduleId: module.id,
    templateUrl: 'home.template.html',
    styles: [`
    h1{
        direction: rtl;
    }
    `],
    providers: [
        {provide: NgbCalendar, useClass: NgbCalendarPersian},
        {provide: NgbDatepickerI18n, useClass: NgbDatepickerI18nPersian}
      ]
})
export class HomeComponent { }

Add the following directive to the template: <ngb-datepicker [firstDayOfWeek]="6">

I'm getting the following errors:

node_modules/@ng-bootstrap/ng-bootstrap/buttons/radio.d.ts(1,10): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.d.ts(1,40): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-window.d.ts(1,36): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/popover/popover.d.ts(1,53): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/tooltip/tooltip.d.ts(1,53): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.d.ts(1,99): error TS2305: Module '"/Volumes/Steve/Projects/FarmManagementSystem/fms/node_modules/@angular/core/index"' has no exported member 'Renderer2'.

Could you please help me to fix the issue?

mehrabisajad commented 7 years ago

Hm. Your error seems to indicate some problem during the npm install. It's basically saying that one of your libs is broken (in this case, angular itself). Can you delete node_modules and do npm install again? If that's the problem, it should fix it.

https://github.com/angular/quickstart/issues/170