AlexLavoie42 / Nuxt-Mapbox

Elegant Mapbox integration with Nuxt
81 stars 11 forks source link

v1.5.9 #101

Closed AlexLavoie42 closed 5 months ago

AlexLavoie42 commented 5 months ago

closes #99 closes #98 closes #105

duncanhall commented 5 months ago

@AlexLavoie42 is this blocked waiting for https://github.com/DefinitelyTyped/DefinitelyTyped/pull/68640 to get merged? Is there anything I can do to help get this released?

AlexLavoie42 commented 5 months ago

Unfortunately I have been running into this build error even after updating the types: error TS7016: Could not find a declaration file for module 'mapbox-gl'. '/home/runner/work/Nuxt-Mapbox/Nuxt-Mapbox/node_modules/.pnpm/mapbox-gl@3.1.2/node_modules/mapbox-gl/dist/mapbox-gl.js' implicitly has an 'any' type.

I assumed this was caused by the outdated types but now I cannot find the problem.

duncanhall commented 5 months ago

Not sure if it adds any more info, but VS code had this offer:

Screenshot 2024-02-28 at 16 21 36

There are also anecdotal suggestions on StackOverflow of this being related to package.json settings which sort of match the VSCode suggesting.

I can't see anything obvious in https://github.com/mapbox/mapbox-gl-js/blob/main/package.json that has changed/needs fixing but it feels like the issue may be dependent on changes there?

Having re-read this I'm wondering actually if the @types/mapbox-gl package.json needs updating to have the definition file recognised correctly?

AlexLavoie42 commented 5 months ago

Having re-read this I'm wondering actually if the @types/mapbox-gl package.json needs updating to have the definition file recognised correctly?

This is exactly what I thought at first. Unfortunately I have already done this in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/68640 which has now been merged. It seems like updating does not make the error go away.

One thing I have noticed is that after the update only the types for version 3.1.0 got published, when from what I can tell it should have automatically done 3.1.2 instead. It could be that I have done something wrong in the types update.

I can't see anything obvious in https://github.com/mapbox/mapbox-gl-js/blob/main/package.json that has changed/needs fixing but it feels like the issue may be dependent on changes there?

I have a feeling this is the cause as well but I could not find anything. One thing I need to test is if the error goes away if I downgrade mapbox-gl back to 2.x. I have a feeling it may be related to a package.json change in mapbox-gl done during 2.x -> 3.x