Inès
Inès
NNuxt
Created by Inès on 8/28/2024 in #❓・help
NuxtLink and SSR pages
Hello, I have a dynamic page (let's call it A) on my nuxt 3.13 project: ~/pages/networks/[name] that uses useAsyncData and is server-side rendered. I also have another dynamic page (let's call it B) in the same project, also server-side rendered, in which I have added a NuxtLink that points to the network page: <NuxtLink to="/networks/networkName"> Name </NuxtLink> I followed the documentation: https://nuxt.com/docs/api/components/nuxt-link However, ever since I did that, on click on that link, my page B no longer renders, and I just have an error error:"[native Error <>Error\n at createError (http://fr.localhost:3002/_nuxt/node_modules/h3/dist/index.mjs?v=cce497c7:78:15)\n at createError (http://fr.localhost:3002/_nuxt/node_modules/nuxt/dist/app/composables/error.js?v=cce497c7:33:21)\n at showError (http://fr.localhost:3002/_nuxt/node_modules/nuxt/dist/app/composables/error.js?v=cce497c7:9:21)\n at Proxy.fetchNetworkData (http://fr.localhost:3002/_nuxt/store/network.ts:65:18)\n at async http://fr.localhost:3002/_nuxt/pages/networks/[name].vue:152:7]" Am I doing something wrong here? Do NuxtLink work well with server-rendered pages? I already tried to use the noPrefetch attribute of NuxtLink but it doesn't change anything. And with a regular <a> tag, navigation works properly. Many thanks!
6 replies
NNuxt
Created by Inès on 7/16/2024 in #❓・help
CORS error on CSS?
Hi, With Nuxt3.11 I have set in my nuxt config a custom cdnUrl. With that set, I keep on having CORS errors in my console for CSS files:
Subresource Integrity: The resource 'https://MY-CUSTOM-CDN-URL/_nuxt/entry.4zpP3XJs.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.
Subresource Integrity: The resource 'https://MY-CUSTOM-CDN-URL/_nuxt/entry.4zpP3XJs.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.
I should specify that my application runs on the same domain, but not the same subdomain as my CDN (both of them are under my responsibility). And it also seems to happen only on components/pages that are not server-side rendered, but I can't change that at the moment. Do you know what I could change to remove these errors and have my CSS correctly applied? Thanks!
2 replies
NNuxt
Created by Inès on 7/9/2024 in #❓・help
Have multiple domains use the same locale
Hello, I'm dealing with some i18n configuration in my nuxt 3.11 project at the moment. In my nuxt.config.ts file I have (development configuration):
i18n: { strategy: 'no_prefix', differentDomains: true, detectBrowserLanguage: false, locales: [ { code: 'de', domain: 'http://de.localhost:3002' }, { code: 'en', domain: 'http://en.localhost:3002' }, { code: 'en-US', domain: 'http://localhost:3002' }, { code: 'en-GB', domain: 'http://www.localhost:3002' } ] },
My i18n.config.ts resembles this:
export default defineI18nConfig(() => ({ legacy: false, globalInjection: true, fallbackLocale: 'en', messages: { en, 'en-GB': en, 'en-US': en, de } }))
I wonder how I could achieve different domains pointing to the same locale (e.g. de-DE and de-AT pointing to de messages in fine)? Many thanks!
20 replies
NNuxt
Created by Inès on 6/27/2024 in #❓・help
Stop fetching favico on every request
No description
13 replies