Giter VIP home page Giter VIP logo

Comments (8)

adinvadim avatar adinvadim commented on August 17, 2024

While debugging this error:

In dist/runtime/nitro/routes/html.mjs renderIsland string with plain HTML

  const island = await renderIsland(options);
  console.log('island', island);

// island <!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=/ru"></head></html>  

And that's why

  head.push(island.head); // → head.push(undefined)

But why fetch /__nuxt_island/${payload.component} return plain string I dont solve yet

from og-image.

adinvadim avatar adinvadim commented on August 17, 2024

In nuxt.config I have this:

  experimental: {
    componentIslands: true,
  },

from og-image.

adinvadim avatar adinvadim commented on August 17, 2024

I think this problem is caused by nuxt i18n and option in nuxt.config i18n.strategy = 'prefix'

from og-image.

harlan-zw avatar harlan-zw commented on August 17, 2024

Looks like a bug with Unhead not being able to handle a null entry useHead(null) from the nuxt i18n module.

I've pushed up a fix to Unhead which will filter out these entries so it won't throw an exception.

Not too sure why this would throw an error on this page though and what the nuxt i18n module is doing, will keep open to investigate further.

from og-image.

adinvadim avatar adinvadim commented on August 17, 2024

Yes, but after fixing this the problem with island components still there, because

  const island = await renderIsland(options);
  console.log('island', island);

// island <!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=/ru"></head></html> 

instead island JSON

from og-image.

harlan-zw avatar harlan-zw commented on August 17, 2024

Hm I see, looks like I'll need to add support for @nuxtjs/i18n

from og-image.

harlan-zw avatar harlan-zw commented on August 17, 2024

Hey, just had some time to get back to this issue. I'll need your nuxt.config or a StackBlitz to try and fix it, I'm not exactly sure how you're doing the redirect or how it connects to how this module works.

from og-image.

harlan-zw avatar harlan-zw commented on August 17, 2024

Going to close for now as I'm trying to close all issues off for the v2 stable release coming. Will re-open if you can provide the details :)

from og-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.