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.

window is not defined 016.1 SSR

See original GitHub issue

Steps to reproduce

It looks like this issue is back https://github.com/vuetifyjs/vuetify/issues/191 Use the webpack-ssr template and update vuetify to version 0.16.1 I’m not sure if this affects it but I am importing the following components a la carte

Vue.use(Vuetify, {
    components: {
        VApp,
        VAvatar,
        VBtn,
        VCard,
        VDialog,
        VIcon,
        VTextField,
        VToolbar,
        transitions
    }
})

Versions

Vue: 2.4.4 Vuetify: 0.16.1 OS: Ubuntu 16.04 Browser: Happens on the server, before the browser

What is expected ?

It is expected not to blow up, works fine on 0.15.7

What is actually happening ?

ReferenceError: window is not defined
    at server-bundle.js:175:2
    at server-bundle.js:164:46
    at module.exports.module.exports (node_modules/style-loader/lib/addStyles.js:67:0)
    at Object.<anonymous> (node_modules/vuetify/src/stylus/components/_app.styl?4cc8:12:0)
    at __webpack_require__ (webpack:/webpack/bootstrap 01055ce4a5b3515c16fc:19:0)
    at Object.<anonymous> (node_modules/vuetify/src/components/VApp/VApp.js:1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap 01055ce4a5b3515c16fc:19:0)
    at Object.<anonymous> (server-bundle.js:1823:64)
    at __webpack_require__ (webpack:/webpack/bootstrap 01055ce4a5b3515c16fc:19:0)
    at Object.<anonymous> (server-bundle.js:1617:86)

Reproduction Link

Can’t make a codepen since it happens during SSR

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
johnleidercommented, Oct 5, 2017

Can you try removing that for me and try again.

0reactions
lock[bot]commented, Apr 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix "window is not defined" in Next.js - Upmostly
This issue has to do with Server-Side Rendering in Next.js. Next.js will by default try to use SSR for your site.
Read more >
How to solve "window is not defined" errors in React and Next.js
Because in the Node.js world, window is not defined, window is only available in browsers. There are three ways to solve that: 1....
Read more >
React SSR window is not defined - javascript - Stack Overflow
Hello guys I'm trying to use dialog polyfill, to open modal window But when I try to register it I get window is...
Read more >
SSR issue: window not defined - Sitecore Stack Exchange
The window object is not available during server side rendering because Node.js does not have a window object - it is a browser...
Read more >
How to solve Next.js window is not defined
Solve a the common ReferenceError: next.js window is not defined error that you may see when doing SSR & pre-rendering.
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