Hello, I am not sure if this is because of my lack of understanding of how the NextJS client components work or if it is a problem with using react-firebase-hooks in NextJS 14.
I am attempting to do firebase authentication from a client component. I am using the hook 'useSigninWithEmailAndPassword' which is taking in information from the state and is called on a form submit.
Authentication does indeed work as intended, but when I go to run 'npm run build' I am getting a 'window not defined' error related to all of my files which implement methods from react-firebase-hooks. I have attempted to wrap these components in a "typeof window !== "undefined" to see if this would fix my build issues but it does not.
I have spent more time than I would like trying to diagnose this issue. Is this to do with the library itself or how I have setup my project?
Here is the component, which lives at src/app/login/page.tsx
Hello, I am not sure if this is because of my lack of understanding of how the NextJS client components work or if it is a problem with using react-firebase-hooks in NextJS 14.
I am attempting to do firebase authentication from a client component. I am using the hook 'useSigninWithEmailAndPassword' which is taking in information from the state and is called on a form submit.
Authentication does indeed work as intended, but when I go to run 'npm run build' I am getting a 'window not defined' error related to all of my files which implement methods from react-firebase-hooks. I have attempted to wrap these components in a "typeof window !== "undefined" to see if this would fix my build issues but it does not.
I have spent more time than I would like trying to diagnose this issue. Is this to do with the library itself or how I have setup my project?
Here is the component, which lives at src/app/login/page.tsx