Skip to content

build error: globalThis is not defined #12757

Answered by jamesmosier
ghost asked this question in Help
Discussion options

You must be logged in to vote

What version of Node are you running (node -v)? It looks like globalThis only works on Node v12 and up (as well as modern browsers).

Alternatively you could ensure this reactfire package only runs in the browser, in which your build would then pass. You could import the component that uses reactfire via a dynamic import with { ssr: false }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant