react-google-oauth
react-google-oauth copied to clipboard
ReferenceError: window is not defined when using server side rendering
Hi,
Here is the error I get when using your component with next.
ReferenceError: window is not defined
at /home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:5912:2
at /home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:5901:46
at ./node_modules/style-loader/lib/addStyles.js.module.exports (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:5946:46)
at Object../src/styles.css (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:7391:134)
at __webpack_require__ (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:680:30)
at fn (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:98:20)
at Object../src/components/login/index.jsx (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:6834:1)
at __webpack_require__ (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:680:30)
at fn (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:98:20)
at Object../src/index.js (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:7115:14)
at __webpack_require__ (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:680:30)
at /home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:726:52
at /home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:729:10
at webpackUniversalModuleDefinition (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:3:20)
at Object.<anonymous> (/home/vincent/gitlab/webapps/thrusters/node_modules/react-google-oauth/dist/react-google-oauth.js:10:3)
at Module._compile (internal/modules/cjs/loader.js:707:30)