Now (2020 Jan) it should be typeof window === 'undefined'
since process.browser
is deprecated
Refer to https://github.com/zeit/next.js/issues/5354#issuecomment-520305040
More Related Contents:
- Can't post data to Google Cloud Run
- Request header field Access-Control-Allow-Headers is not allowed by itself in preflight response
- Queries hang when using mongoose.createConnection() vs mongoose.connect()
- How to use passport with express and socket.io?
- Enabling CORS in Create React App utility
- Express routes parameters
- Does Axios support Set-Cookie? Is it possible to authenticate through Axios HTTP request?
- Angular and Express routing
- Firebase Hosting with dynamic cloud functions rewrites
- collection is not defined in mongodb
- How to access POST form fields in Express
- Express.js req.body undefined
- Render basic HTML view?
- Rest with Express.js nested router
- What is NODE_ENV and how to use it in Express?
- How to get all registered routes in Express?
- Can’t import SVG into Next.js
- Error: No default engine was specified and no extension was provided
- Fresh NextJS App throwing errors before any changes
- How do I move files in node.js?
- node.js http.get hangs after 5 requests to remote site
- Express res.sendfile throwing forbidden error
- res.sendfile in Node Express with passing data along
- ExpressJS & Websocket & session sharing
- Next.js context provider wrapping App component with page specific layout component giving undefined data
- Error message “ENOENT, no such file or directory”
- Node.js / Express.js – How to override/intercept res.render function?
- Next.js SyntaxError “Unexpected token ‘export'”
- Why POST redirects to GET and PUT redirects to PUT?
- Next failed to load SWC binary