Topic: [ssr] window is not defined. Problem with vue-perfect-scrollbar
                  
                  krim
                  pro
                  asked 6 years ago
                
There is the problem with "vue-perfect-scrollbar". Please replace it with https://www.npmjs.com/package/vue2-perfect-scrollbar
It's very easy to replace it. The second package just the same, but with SSR support.
                      
                      Magdalena Dembna
                      staff
                        answered 6 years ago
                    
Hi, We've updated Perfect Scrollbar in the latest MDB Vue version 5.3.0. and I hope this problem will not occur anymore. Please let us know if you're still experiencing any difficulties. Kind regards, Magdalena
                      
                      paddek
                      free
                        answered 6 years ago
                    
I stumbled across the same problem during evaluation of MDB Vue for our nuxt project. For me a quick and dirty solution is this snipped...
require('require-extension-hooks')('js').push(({filename, content}) => {
    if (filename.endsWith('/node_modules/vue-perfect-scrollbar/dist/index.js')) {
        return ['!process.client && require("browser-env")()', content].join('\n');
    }
});
placed in the nuxt app entry /server/index.js
                      
                      krim
                      pro
                        answered 6 years ago
                    
@Mikołaj Smoleński Have you got any news to fix it?
Mikołaj Smoleński staff commented 6 years ago
It will surely be released with the next version of MDB Vue.
We apologize for the delay.
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB Vue
 - MDB Version: 4.8.2
 - Device: all
 - Browser: all
 - OS: all
 - Provided sample code: No
 - Provided link: No