Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload component is not SSR friendly #1024

Closed
cesasol opened this issue Oct 9, 2018 · 6 comments
Closed

Upload component is not SSR friendly #1024

cesasol opened this issue Oct 9, 2018 · 6 comments

Comments

@cesasol
Copy link

cesasol commented Oct 9, 2018

Buefy version: [0.7.0]
Vuejs version: [2.5.17]
OS/Browser: Node Js / Nuxt

Description

Latest update broke SSR compatibility by checking for File in a prop without making sure is defined if not available globally

Steps to reproduce

Just use buefy as a plugin on nuxt with universal mode

Expected behaviour

Fake the File property if not available on the global scope

Actual behaviour

ReferenceError: File is not defined

@willhoyle
Copy link

Can confirm. Got the same error

@jtommy
Copy link
Member

jtommy commented Oct 17, 2018

@cesasol, the fix will be available in the next version (v0.7.1). But as workaround add this line to your file nuxt.config.js

// nuxt.config.js

global.File= typeof window === 'undefined' ? Object : window.File

...

@nnfans
Copy link

nnfans commented Oct 21, 2018

@cesasol, the fix will be available in the next version (v0.7.1). But as workaround add this line to your file nuxt.config.js

// nuxt.config.js

global.File= typeof window === 'undefined' ? Object : window.File

...

Hope it will be fixed in v0.7.1 because someone said it will be fixed in the v0.6.4 back then

@azeranex , the fix will be available in the next version (v0.6.4). But for you to continue your tasks add this line to your file nuxt.config.js

// nuxt.config.js

global.HTMLElement = typeof window === 'undefined' ? Object : window.HTMLElement

...

@rikoz
Copy link

rikoz commented Nov 17, 2018

Is there a fix for this yet, experiencing the same issue

@jtommy
Copy link
Member

jtommy commented Nov 17, 2018

buefy/nuxt-buefy#32

@shawnlauzon
Copy link

I've verified, this solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants