Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V17] ReferenceError: navigator is not define (Next.js) #1777

Closed
nghiepdev opened this issue Jan 31, 2021 · 3 comments · Fixed by #1778
Closed

[V17] ReferenceError: navigator is not define (Next.js) #1777

nghiepdev opened this issue Jan 31, 2021 · 3 comments · Fixed by #1778
Assignees
Labels
bug Something isn't working released

Comments

@nghiepdev
Copy link

What is the current behavior?
After upgrade to 17.0.0 from 15.3.8

ReferenceError: navigator is not define
node_modules/react-use/lib/useNetworkState.js:5:11)

Steps to reproduce:
https://codesandbox.io/s/red-cookies-yyq9f?file=/pages/index.js

What is the expected behavior?
Just work again on Next.js.

A little about versions:

  • OS: macOS
  • Browser (vendor and version):
  • React: 17.0.1
  • react-use: 17.0.0
  • Did this worked in the previous package version?
    15.3.8
@xobotyi xobotyi self-assigned this Jan 31, 2021
@xobotyi xobotyi added the bug Something isn't working label Jan 31, 2021
xobotyi added a commit that referenced this issue Jan 31, 2021
should fix: #1777

Also introduce jest config for ssr tests (it fails hard now).
streamich pushed a commit that referenced this issue Jan 31, 2021
## [17.0.1](v17.0.0...v17.0.1) (2021-01-31)

### Bug Fixes

* proper definition for isBrowser and isNavigator states. ([a087deb](a087deb)), closes [#1777](#1777)
@streamich
Copy link
Owner

🎉 This issue has been resolved in version 17.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@xobotyi
Copy link
Contributor

xobotyi commented Jan 31, 2021

@nghiepit recheck please with 17.0.1 is it back to normal?

@nghiepdev
Copy link
Author

Wow too quickly.
Tks @xobotyi it works again.

kamranayub pushed a commit to kamranayub/react-use that referenced this issue May 28, 2021
should fix: streamich#1777

Also introduce jest config for ssr tests (it fails hard now).
kamranayub pushed a commit to kamranayub/react-use that referenced this issue May 28, 2021
## [17.0.1](streamich/react-use@v17.0.0...v17.0.1) (2021-01-31)

### Bug Fixes

* proper definition for isBrowser and isNavigator states. ([a087deb](streamich@a087deb)), closes [streamich#1777](streamich#1777)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants