TwicPics / components

A Web component library that brings the power of TwicPics to your favorite web framework.
MIT License
53 stars 2 forks source link

Nuxt 3: [runtimeConfig] You are trying to access a public runtime config value (twicpics) directly from the top level. This currently works (for backward compatibility with Nuxt 2) but this compatibility layer will be removed in v3.5. Instead, you can update config['twicpics'] to config.public['twicpics']. #52

Closed awacode21 closed 1 year ago

awacode21 commented 1 year ago

I am getting this console log:

[runtimeConfig] You are trying to access a public runtime config value (twicpics) directly from the top level. This currently works (for backward compatibility with Nuxt 2) but this compatibility layer will be removed in v3.5. Instead, you can update config['twicpics'] to config.public['twicpics'].

when using Twicpics ("@twicpics/components": "^0.17.2") with nuxt 3 ("nuxt": "^3.4.2").

i think it might come from the twicpics component package.. as i am not using a twicpics runtime config in my project code, also when searching it i cannot find it, it's not part of my runtime config.

So i guess it comes with the plugin of twicpics. Please have a look. Best regards, Annick

mbgspcii commented 1 year ago

Hi @awacode21.

Thank you for your precious comment.

We are looking into it and will keep you informed.

Thank you for using our components, we hope you are satisfied with them.

Best regards.

Miguel

awacode21 commented 1 year ago

Maybe this helps, i think in you plugin.js you are calling directly from root of runtimeConfig, but your env var "twicpics" is to be found under public. So the call should be runtimeConfig.public.twicpics

Bildschirm­foto 2023-04-22 um 19 33 24
mbgspcii commented 1 year ago

You are right. It's clearly related to our package. I just reproduced it...

I have to check the proposed fix is not a problem with the older version of Nuxt3.

Thank you for your analysis and once again for your valuable feedback.

Wishing you a good day.

Miguel

mbgspcii commented 1 year ago

Hi @awacode21.

We have just deployed version 0.17.3 which should fix the issue with the Nuxt3 module.

Do not hesitate if you encounter any other anomalies.

Regards and thanks again for your analysis.

Miguel

awacode21 commented 1 year ago

Hi Miguel,

i just checked the new version and it is working fine. Thank you very much for the quick fix.

Best regards, Annick