Dilshan Liyanage
Dilshan Liyanage

Reputation: 4558

Error when updating from angular 7 to Angular 8.0.0-beta.7 with ngx-bootstrap

I am using ngx-bootstrap in my Angular 7 project and I wanted to update to 8.0.0-beta.7 just to check out the new version but I am getting an error from the ngx-bootstrap timepicker component

ERROR in node_modules/ngx-bootstrap/timepicker/models/index.d.ts(2,38): error TS2307: Cannot find module '@angular/forms/src/directives/control_value_accessor'.
node_modules/ngx-bootstrap/timepicker/models/index.d.ts(3,22): error TS2307: Cannot find module '@angular/core/src/type'.

Is there any way I can do something about this so that I can check out the new Angular 8 Beta.

Upvotes: 4

Views: 2841

Answers (2)

Adesegun Koiki
Adesegun Koiki

Reputation: 71

Update ngx-bootstrap in package.json

"ngx-bootstrap": "^5.2.0",

Then run 'npm install'

Upvotes: 1

joka00
joka00

Reputation: 2547

Already when you install ngx-bootstrap to Angular 8.0-beta warning appears.

npm WARN [email protected] requires a peer of @angular/common@>=6.0.0 but none is installed...
npm WARN [email protected] requires a peer of @angular/core@>=6.0.0 but none is installed...

At this time you are not able to run the application without error because the structure has changed in Angular 8.

For example:

error TS2307: Cannot find module '@angular/forms/src/directives/control_value_accessor'.

The src directory doesn't exist there anymore now it can be imported from this path @angular/forms

What can you do with it.

Stay at Angular 7.x.x - stable and wait for ngx-bootstrap update

Or

After updating few paths where were the errors it started working. But I wouldn't recommend doing this.

Upvotes: 3

Related Questions