question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does this work in SPA mode??

See original GitHub issue

Hello,

I am curious if this package works in SPA mode?

<template>
  <div>
    <h1>HELLO</h1>

    <article>
    <nuxt-content :document="doc" />
  </article>
  </div>
</template>

<script>


export default {
  components: {

  },
  async asyncData({$content}) {
    const doc = await $content('index').fetch();
    return {doc}
  }
}
</script>

This is my code, and somehow on my local machine this works…but I always thought asyncData only works for SSR Mode?

However, when I upload this to firebase hosting, it does not work anymore.

Trying to understand why.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MatejBalanticcommented, Sep 29, 2020

Hi @febrihidayan, our solution was to move away from nuxt/content and use markdown-it to load our MD files

2reactions
seeARMScommented, Sep 25, 2020

I’m running server mode and encountering the same exception @MatejBalantic is encountering. nuxt-content works locally (nuxt start) but not when deployed to Vercel. Commenting out the @nuxt/content module in nuxt.config.js gets rid of the problem.

 ERROR  inject('content', value) has no value provided
  at inject (.nuxt/index.js:149:0)
  at plugin_server (.nuxt/content/plugin.server.js:9:0)
  at createApp (.nuxt/index.js:209:0)
  at async module.exports.__webpack_exports__.default (.nuxt/server.js:81:0)
Read more comments on GitHub >

github_iconTop Results From Across the Web

How is heat in spa mode supposed to work? - Trouble Free Pool
1. Switch to spa mode (in this mode water is only moving through the spa) · 2. Turn off pool filter · 3....
Read more >
Spa mode helps keep spa water fresh and clean
Putting your pool into spa mode is something that can be handled remotely with smart systems such as IntelliTouch, EasyTouch, and EasyTouch Lite ......
Read more >
Valve Settings – Spa Mode - Pool Stop
VALVE SETTINGS – SPA MODE. In spa mode, on the intake side. the spa drain is open and the pool drain and skimmers...
Read more >
How to turn on a swimming pool into spa mode. | PoolStar
There are many types of automation controllers and they are all slightly different but basically, you're trying to accomplish the same thing that...
Read more >
Shared Pool & Spa Systems - Swimming Pool Steve
During the time in "spa mode" the pool is essentially stagnant as no water is being sucked, filtered, heated or returned to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found