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

Compilation error after update to Angular 7.2.0/TypeScript 3.2.2 #90

Closed
dmytro-gokun opened this issue Jan 8, 2019 · 6 comments
Closed

Comments

@dmytro-gokun
Copy link
Collaborator

Before update:
"@angular/core": "7.1.4",
"mapbox-gl": "0.51.0",
"ngx-mapbox-gl": "2.3.2"
"typescript": "3.1.6"
"@types/mapbox-gl": "0.51.3"

After running "ng update":

"@angular/core": "7.2.0",
"mapbox-gl": "0.51.0",
"ngx-mapbox-gl": "2.3.2"
"typescript": "3.2.2"
"@types/mapbox-gl": "0.51.3"

ERROR in node_modules/ngx-mapbox-gl/lib/map/map.component.d.ts(9,13): error TS2717: Subsequent property declarations must have the same type. Property 'transformRequest' must be of type 'TransformRequestFunction | undefined', but here has type 'Function | undefined'.

So, it looks like the error was here before, but was not "noticed" by typescript previously? I'm not sure.

@sprattek
Copy link

sprattek commented Jan 9, 2019

I currently have few more errors with same configuration.

ERROR in node_modules/ngx-mapbox-gl/lib/map/map.component.d.ts(9,13): error TS2717: Subsequent property declarations must have the same type.  Property 'transformRequest' must be of type 'TransformRequestFunction', but here has type 'Function'.
node_modules/ngx-mapbox-gl/lib/map/map.service.d.ts(110,31): error TS2709: Cannot use namespace 'BBox' as a type.
node_modules/ngx-mapbox-gl/lib/marker-cluster/marker-cluster.component.d.ts(22,24): error TS2709: Cannot use namespace 'Supercluster' as a type.
node_modules/ngx-mapbox-gl/lib/marker-cluster/marker-cluster.component.d.ts(33,28): error TS2709: Cannot use namespace 'Cluster' as a type.
node_modules/ngx-mapbox-gl/lib/marker-cluster/marker-cluster.component.d.ts(34,30): error TS2709: Cannot use namespace 'Cluster' as a type.
node_modules/ngx-mapbox-gl/lib/marker-cluster/marker-cluster.component.d.ts(35,42): error TS2709: Cannot use namespace 'Cluster' as a type.

LennyZ71 added a commit to LennyZ71/ngx-mapbox-gl that referenced this issue Jan 9, 2019
@twrayden
Copy link

twrayden commented Jan 13, 2019

For anyone (like myself) needing a temporary fix for this. Just downgrade to "Typescript": "3.1.6"

npm i --save-dev --save-exact [email protected]

Note: Make sure you update Typescript after, otherwise it will stay at 3.1.6.

@dmytro-gokun
Copy link
Collaborator Author

@Wykks Could you please tell us if you have plans to fix this? Also, we need to upgrade to mapbox 0.52.0, so we do not get the warning when using the wrapper with that newer version.

If you do not have time, that is okay - just let us know and I think someone (e.g. me) can create a pull request and so on. The thing is that we are using your great library in our commercial projects and we need it to be updated/have bugs fixed more promptly than it happens now. For sure, we can fork and so on, but I'd not like doing that, only as the last resort.

Anyways, thanks for the great library!

@Wykks
Copy link
Owner

Wykks commented Jan 21, 2019

Hi !

I'm going to take a look this week :)

@juangcarmona
Copy link

juangcarmona commented Jan 23, 2019

Hi,

I'm having same errors as @sprattek, are these errors related with the first one or is related with my configuration? (Honestly, those links at the bottom of the documentation are quite confusing because the answers are quite old... I'm using Angular 7 and I couldn't find a solution to my issue there...)

Thanks!

@Wykks Wykks closed this as completed in 9fc58ca Jan 27, 2019
@dmytro-gokun
Copy link
Collaborator Author

@Wykks Thanks a lot for the fix. It works great (Y)

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

5 participants