react icon indicating copy to clipboard operation
react copied to clipboard

[BUG] With Gatsby.JS, we get the error "document is not defined" on build

Open MalkyTheKid opened this issue 5 years ago • 5 comments

We tried the basic example on the readme with our gatsby.js implementation.

Running it on gatsby develop, we do see the form and it is drawn fine. However when we do gatsby build, we get the following error:

 ERROR #95312 

"document" is not available during server side rendering.

See our docs page for more info on this error: https://gatsby.dev/debug-html


  867 | 
  868 | // IE >= 9
> 869 | 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
      | ^
  870 |   var e = document.createEvent('CustomEvent');
  871 |   if (params) {
  872 |     e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);

Gatsby talks about document here: https://www.gatsbyjs.com/docs/debugging-html-builds/

is there a proper way to run formIO in gatsby.js?

MalkyTheKid avatar Aug 25 '20 01:08 MalkyTheKid

Hello @MalkyTheKid Thank you for reaching out!

We have added this item to our backlog.

We welcome a pull request and also have a process to expedite this issue if you are interested.

If you are interested in expediting, please let us know and we can get the process started. For reference, the ticket number is FJS-1190.

Have a great day!

wag110894 avatar Aug 28 '20 17:08 wag110894

Hi Will (@wag110894),

How do we begin the process of expediting this item? (FJS-1190)

We believe this could be useful especially with Gatsby JS on the rise

MalkyTheKid avatar Sep 01 '20 15:09 MalkyTheKid

@MalkyTheKid Please reach out to [email protected] and let them know that you are interested in expediting FJS-1190.

wag110894 avatar Sep 04 '20 15:09 wag110894

Hi there @wag110894 I just wondered if there is any update on this as it is also affecting us?

@MalkyTheKid did you manage to find a suitable workaround?

Thanks, Murray

murrayw24 avatar Nov 24 '20 11:11 murrayw24

Hello @murrayw24, This item is still on our backlog. As I mentioned above, we do welcome pull requests and also have a process to expedite this issue if you are interested.

If you are interested in expediting, please let us know by contacting [email protected] and we can get the process started.

wag110894 avatar Nov 24 '20 17:11 wag110894

I am closing the issue as it was created too long ago and there is no new comments here. If the issue is not resolved, please reopen it. Thanks!

TanyaGashtold avatar Aug 31 '23 13:08 TanyaGashtold