Open Butcher086 opened 3 years ago
Hm, that's weird. Can you tell me which version of Angular you are using ? Or do you have any repo where I could reproduce the issue ?
Hi, yes it's weird, I follow the steps, tutorials etc in case I'm doing something wrong, but nothing like that. So the angular version is 12.2.4. Should I update to 13? About the code, I'm not able to share the code because it's a company project, but I can try to explain it. So I have a App.module.ts where I add the package as you explain in readme. Then the map I wanted to use it in a component nested inside the map structure. [cid:748fed77-e907-4cd6-82a0-3eb212a15a49]
So just to try another way, I created a map-viewer.module.ts, where I added the azure maps module dropped from app.module.ts. But it's not working.
I will try to prepare for you a code example but I hope with these information you can discover it.
Thanks a lot.
De: Arnaud Leclerc @.> Enviado: viernes, 5 de noviembre de 2021 6:29 Para: arnaudleclerc/ng-azure-maps @.> Cc: Ruben @.>; Author @.> Asunto: Re: [arnaudleclerc/ng-azure-maps] node_modules package error (Issue #40)
Hm, that's weird. Can you tell me which version of Angular you are using ? Or do you have any repo where I could reproduce the issue ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farnaudleclerc%2Fng-azure-maps%2Fissues%2F40%23issuecomment-961637605&data=04%7C01%7C%7C5599efeb994c484a0cc508d9a01d30da%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716869503771282%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rKX1nhE0aeez%2BOT7citw5hK86JnumEGwBWHtORf3Gog%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABNX7HAMCGXBGMQQMQGYJFDUKNTSHANCNFSM5HLIL32Q&data=04%7C01%7C%7C5599efeb994c484a0cc508d9a01d30da%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716869503771282%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xFf7mHKQ7WONmRFDqHoDQoT9OviFaPzj5Y1awCBlAAw%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C5599efeb994c484a0cc508d9a01d30da%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716869503781276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hsnlp6Elkyjb1%2BIRkEo1xxUBUhEpgg8sThaXQgNn9V4%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C5599efeb994c484a0cc508d9a01d30da%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637716869503791270%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=T2EYSfdV%2FLDVhaA6M3dBwRntAzo9E%2BOyyDRcVdKnp%2Bk%3D&reserved=0.
I have create a new angular project, just a basic example, with the azure maps package added, and the error are the same. this is the repo if you want to check it: [https://github.com/Butcher086/azuremapsbasictest]
I use angular 12.2.4.
Thanks, I will try to take a look at it today. Updating to angular 13 wouldn't help right now, because this library still has (for now) a dependency on angular 12. If I had to guess, I think there was a breaking change on a newer version of an azure-maps package. I will try to update the dependencies (expect angular) and see if it works.
No problem, thanks for the effort. I hope it would be easy to fix it.
Weirdly enough, when I start a new angular 12 application and run npm i --save azure-maps-control azure-maps-drawing-tools azure-maps-rest ng-azure-maps
, the build runs without any issue. But when I clone your repo and try to build it, I can reproduce your issue. I am still looking for a difference between the two applications
Umm so weird. In my case, the project I made for the demo it's a basic angular project and it doesn't has anything added, just your wrapper. I hope you can see the differences :)
After a while, I realized you are compiling in strict
mode and I was not. Sadly, the typings of azure-maps-rest
and azure-maps-drawing-tools
seems to be incompatible with the strict
mode : one is missing a return type on a method, the other is using a wrong constraint.
The third message you receive comes from an error on the typings of ng-azure-maps
. This is the same reason as for the azure-maps-rest
library.
I will be able to fix the issue on ng-azure-maps
by respecting the constraint, but even if I do that, you will still receive the two other errors from the other packages. azure-maps-drawing-toolbar
as a new major version to which I will upgrade, but there seems to be no changes to this point. The latest version of azure-maps-rest
is already targeted and has not been updated for two years.
I am thinking of moving the support of azure-maps-rest
and azure-maps-drawing-toolbar
to another library, but this will not happen anytime soon and would require a new major version. In the meantime, the only chance you have to make it working is to put the strict
property on your tsconfig
to false
.
PS : you might want to regenerate your subscription key, you pushed it on your GIT repository.
A V 4.1.0 has been published to temper the issue. Could you please give it a try ?
Hi arnau, I just tested the new version you made and you are right, the error on ng-azure-maps disappear, but the othre two are still there. As you said, I change the strict mode to false and it's working so perfect meantime. I guess if the azure-maps-rest is out of date trigger some error with latest versions of other dependencies, but in future you will change to another library it will be great. For now it's working so maybe it's a good idea to add a note in the documentation with the strict mode to false, just in case more people ask you about it. Anyway, thanks a lot for the support and your effort.
PS: Yep I'm going to regenerate the key, thanks for telling me.
Hey there, I'm having some troubles running my application after installing the package. I'm not sure if I'm doing something wrong or if something is wrong configured. See the error below
Hi, I'm trying to install and use this package to create an azure map on my angular project, but after install the packages and build the application, appears the following errors.
I hope you can help me.
Thanks!.