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.

Having trouble with SSR issue Vue JS

See original GitHub issue

I’m having trouble getting this to build when working with Vue JS/Gridsome. I’ve wrapped the directive component in <ClientOnly> per the Gridsome documentation and also tried to import it into the mounted hook, but still getting the ReferenceError: window is not defined

<ClientOnly>
            <div class="hiw-card" id="hiw-deliver"
                 v-waypoint="{active: true, callback: mobScroll, options: intersectionOptions }">
              <h4>Deliver</h4>
              <p>A customers’ data is available via conventional REST API, as well as via a digital wallet, as
                frequently
                as energy is read and CO2e offset/liability calculated (continuously), and as frequently as RECs are
                accumulated in mWh bundles.
              </p>
              <b-row class="justify-content-center">
                <b-col cols="3">
                  <i class="fas fa-database fa-3x hiw-icon"></i>
                </b-col>
                <b-col cols="3">
                  <i class="far fa-long-arrow-alt-right fa-3x hiw-icon"></i>
                </b-col>
                <b-col cols="3">
                  <i class="far fa-user fa-3x hiw-icon"></i>
                </b-col>
              </b-row>
            </div>
          </ClientOnly>
mounted () {
            window.waypoint = require('vue-waypoint')
    }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sebj54commented, Feb 26, 2020

Great! Thanks for the update, I’ll test it in the next days and let you know.

0reactions
scaccogattocommented, Mar 4, 2020

Great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-Side Rendering (SSR) - Vue.js
Synchronous being the key word there. If your app starts with a loading spinner, then fetches content via Ajax, the crawler will not...
Read more >
Vue SSR issue with no ssr - Stack Overflow
The issue that I'm currently having is no SSR components are failing as soon as I import them to components. I'm aware of...
Read more >
Understand and solve hydration errors in Vue.js - sum.cumo
Understand and solve hydration errors in Vue.js ✘ What is hydration? When do problems occur? What are the causes?
Read more >
Server Side Rendering - Vue Community
When to use Server-Side Rendering (SSR) in Vue.js projects ... Server side rendering solves a few of the most annoying problems of single-page...
Read more >
Global state in SSR with Vue and Node.js - Medium
This can lead to problems if this stateful object is not only changed on application startup, but on each request. Compare these three...
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