PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

Duplicate Typings after ng2-material import

Open technoSpino opened this issue 10 years ago • 4 comments

I started with a new project, npm installed ng2-material and added to the vendor.ts

import 'ng2-material/all';

Now I keep getting errors such as

ERROR in ~/dev/angular2-webpack-starter/typings/main/ambient/angular-protractor/angular-protractor.d.ts
(1677,9): error TS2300: Duplicate identifier 'resetUrl'.

Any ideas?

technoSpino avatar Jan 23 '16 13:01 technoSpino

Seems this is an issue with 2 versions of angular running https://github.com/justindujardin/ng2-material/issues/20.

Is there a way keep an imported package from using a different angular version?

technoSpino avatar Jan 23 '16 20:01 technoSpino

i was able to get ng2-material to fly with the latest of this repo by manually changing the ng2-material package.json to use the same version of angular2 as the app...It is certainly not ideal, but I noticed here (https://github.com/justindujardin/ng2-material/issues/20) that the only reason ng2-material is not currently using the latest version of the ng2 beta is because it breaks testing in IE....so if you dont care about testing in IE i think that can solve the problem...

however, after working through several other issues, i am currently stuck as the app is not loading the material icons and fonts properly.

dweitz43 avatar Jan 28 '16 21:01 dweitz43

Just make a PR to ng2-material, and rename prod deps to peerDependencies

valorkin avatar Feb 07 '16 13:02 valorkin

closing for now. if you still have the problem please reopen the issue

PatrickJS avatar Mar 30 '16 03:03 PatrickJS