ng2-date-picker: node_modules/ng2-date-picker/ng2-date-picker.d.ts, found version 4, expected 3, resolving symbol NavigationTabModule

sk555

I have angular-cli 1.5.6 when i clone an angular 4 project after runing npm install and when serving the project using ng serve I got this error with ng2-date-picker

ERROR in C:/Users/.../node_modules/ng2-date-picker/common/types/selection-evet.enum..d.ts (2,13): In ambient enum declarations member initializer must be constant expression.

ERROR in C:/Users/.../node_modules/ng2-date-picker/common/types/selection-evet.enum..d.ts (3,17): In ambient enum declarations member initializer must be constant expression.

ERROR in Metadata version mismatch for module C:/Users/.../node_modules/ng2-date-picker/ng2-date-picker.d.ts, found version 4, expected 3, resolving symbol NavigationTabModule in C:/Users/.../src/app/navigation-tab/navigation-tab.module.ts, resolving symbol NavigationTabModule in C:/Users/.../src/app/navigation-tab/navigation-tab.module.ts

In package.json file I have "ng2-date-picker": "^2.8.1"

sk555

The solution that fixed my problem is getting rid of the ^ in ng2-date-picker version in package.json

Replacing "ng2-date-picker": "^2.8.1" to "ng2-date-picker": "2.8.1" fixed the error.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related