Swapnil Deo
Swapnil Deo

Reputation: 281

Cannot Find name Partial

I am using ngx-bootstrap 1.9.2 npm package, but when I try to compile, my project, angular throws following error:

ERROR in C:/xxx/xx/node_modules/ngx-bootstrap/datepicker/bs-datepicker.component.d.ts (46,15): Cannot find name 'Partial'.

ERROR in C:/xxx/xx/node_modules/ngx-bootstrap/datepicker/bs-daterangepicker.component.d.ts (45,15): Cannot find name 'Partial'.

As Partial was introduced in ts version 2.1, I tried upgrading typescript version from 2.0.0 to 2.5.2 nothing helped.

Upvotes: 1

Views: 2542

Answers (3)

Dileep
Dileep

Reputation: 356

For me it worked after doing the following steps.

  1. install the latest typescript version globally. use below command. npm install -g typescript@latest
  2. Clean the npm cache using
    npm clean cache
  3. Install the latest typescript locally. npm install -g typescript@latest

And it worked for me. Hope it helps.

Upvotes: 0

Swapnil Deo
Swapnil Deo

Reputation: 281

It was just cache issue, I just perform npm cache clean and performed clean install and my problem was solved.

By the way thanks all, for your comments and answers.

Upvotes: 0

valorkin
valorkin

Reputation: 1339

we use typescript 2.4.2, because it's mandatory for angular@5. What can help:

Upvotes: 0

Related Questions