Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular 6 update issue #107

Open
vardansafaryan0407 opened this issue Aug 2, 2018 · 3 comments
Open

angular 6 update issue #107

vardansafaryan0407 opened this issue Aug 2, 2018 · 3 comments

Comments

@vardansafaryan0407
Copy link

vardansafaryan0407 commented Aug 2, 2018

hi, after updating angular 6 I received current compile error`

ERROR in node_modules/angular2-material-datepicker/src/datepicker.component.ts(2,3): error TS2305: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'animate'.
node_modules/angular2-material-datepicker/src/datepicker.component.ts(2,56): error TS2305: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'keyframes'.
node_modules/angular2-material-datepicker/src/datepicker.component.ts(3,43): error TS2305: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'state'.
node_modules/angular2-material-datepicker/src/datepicker.component.ts(3,50): error TS2305: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'style'.
node_modules/angular2-material-datepicker/src/datepicker.component.ts(3,57): error TS2724: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'transition'. Did you mean 'TRANSLATIONS'?
node_modules/angular2-material-datepicker/src/datepicker.component.ts(3,69): error TS2305: Module '"C:/xampp/htdocs/cyance/nexus/nexus-migrating/node_modules/@angular/core/core"' has no exported member 'trigger'.

seems this is related to separating some modules from @angular/core

any hints how could this be solved?

Thanks in advance

@humblepie
Copy link

I just upgraded an old Angular 4.x project to Angular 6.x and ran into the same problem. This project looks like it has been abandoned. There hasn't been a commit since Jan 24th, 2017.

I got it to run by patching the node_modules/datepicker.component.ts file and changing the animation references to @angular/animations.

import {
    Component, ElementRef, EventEmitter, Input, OnChanges,
    OnInit, Output, Renderer, SimpleChange
} from '@angular/core';

import {
    animate, keyframes, state, style, transition, trigger
} from '@angular/animations';

I then created a patch file and apply the patch postinstall

@vardansafaryan0407
Copy link
Author

vardansafaryan0407 commented Aug 23, 2018

@humblepie actuall I have already solved the issue updating jquery and adding @types/jquery of the same version`

this is my package.json
"dependencies": {
"@angular/animations": "6.1.0",
"@angular/common": "6.1.0",
"@angular/compiler": "6.1.0",
"@angular/compiler-cli": "6.1.0",
"@angular/core": "6.1.0",
"@angular/forms": "6.1.0",
"@angular/http": "6.1.0",
"@angular/platform-browser": "6.1.0",
"@angular/platform-browser-dynamic": "6.1.0",
"@angular/platform-server": "6.1.0",
"@angular/router": "6.1.0",
"angular2-material-datepicker": "^0.5.0",
"jquery": "3.3.5",
.........
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0",
"@angular/cli": "^6.1.1",
"@types/jquery": "^3.3.5",
.......
},
this works for me

@schnucks-rrphillips
Copy link

It's a mystery to me how updating @types/jquery and jquery would have any bearing on the fact that this module is incompatible with Angular 6. The issue with angular2-material-datepicker is it imports animate from @angular/core instead of the new location @angular/animations. Also, there is no version 3.3.5 of jquery so npm install reports: No matching version found for jquery@^3.3.5. jquery 3.3.1 is the latest. But I tried this suggestion anyway with the latest versions of both and unsurprisingly I got the same error: /node_modules/@angular/core/core"' has no exported member 'animate'. It would be lovely if this project got updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants