build error: globalThis is not defined #12757
-
Not sure what to do here. I tried adding a polyfill. using -> https://github.com/FirebaseExtended/reactfire Build Log
Packages"next": "canary",
"react": "experimental",
"react-dom": "experimental", (all on latest version) Next Config
|
Beta Was this translation helpful? Give feedback.
Answered by
jamesmosier
May 12, 2020
Replies: 1 comment 1 reply
-
What version of Node are you running ( Alternatively you could ensure this |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Node are you running (
node -v
)? It looks likeglobalThis
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 usesreactfire
via a dynamic import with{ ssr: false }