Closed starladyrie closed 2 years ago
Hey, it seems that you cannot have public runtime registered like this for nuxt-edge.
The module registers the configuration from nuxt.config.ts by using public runtime config. I will check how other modules achieve nuxt edge compatibility for such cases and will get back to you with an answer
Got it, thank you so much!!
@starladyrie I know what is the reason.
In nuxt-edge public runtime config is accessible in a different way:
nuxt.options.publicRuntimeConfig
insteead of nuxt.options.runtimeConfig.public
in Nuxt 3.
I will create a pull request with this change and release a 1.1.1 version with this fix for Nuxt 2 this week
@Baroshem thank you so much, I'll be waiting for this new release then!!
Hey @starladyrie
I tested your reproduction repo with the new 1.1.1 version and it seems to be working correctly :)
Thanks for raising this issue and if you have any questions, do not hesitate to contact me.
Happy coding!
@Baroshem I tested in my project and it's no longer throwing that error! Thank you so much for your help 😄
Version
@nuxtjs/algolia: 1.1.0 nuxt: "nuxt-edge": latest
Reproduction Link
https://github.com/starladyrie/algolia-bug
Steps to reproduce
What is Expected?
Project should run normally
What is actually happening?
Algolia is throwing the following error: