Giter Club home page Giter Club logo

Comments (13)

gurkerl83 avatar gurkerl83 commented on September 24, 2024 2

The last working version is 1.9.10.

from react-device-detect.

duskload avatar duskload commented on September 24, 2024 1

Hi @stzonis, I will look on it shortly. Thanks!

from react-device-detect.

Fluorz avatar Fluorz commented on September 24, 2024 1

Same error here

/node_modules/react-device-detect/main.js:423
return (/iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !window.MSStream;

ReferenceError: navigator is not defined

from react-device-detect.

stzonis avatar stzonis commented on September 24, 2024 1

@duskload version 1.11.14 works for me!

from react-device-detect.

elswenson avatar elswenson commented on September 24, 2024 1

@duskload Thank you for the quick fix and responsiveness!

from react-device-detect.

duskload avatar duskload commented on September 24, 2024

@stzonis, uploaded a fix, can you update and have a look?

from react-device-detect.

stzonis avatar stzonis commented on September 24, 2024

With the version "1.11.12", I am still getting the error:

failed Building static HTML for pages - 5.220s
ERROR #95312
"navigator" is not available during server side rendering.
See our docs page for more info on this error: https://gatsby.dev/debug-html

421 |
422 | var getIOS13 = function getIOS13() {

423 | return navigator && (/iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && !window.MSStream;
| ^
424 | };
425 |
426 | var getIPad13 = function getIPad13() {

WebpackError: ReferenceError: navigator is not defined

  • main.js:423 getIOS13
    node_modules/react-device-detect/main.js:423:1

  • main.js:512 Object../node_modules/react-device-detect/main.js
    node_modules/react-device-detect/main.js:512:1

from react-device-detect.

duskload avatar duskload commented on September 24, 2024

Added another update. If it's not working - try clear cache, for gatsby do something like:

rm -rf node_modules && rm -rf ./cache && npm i && gatsby build && gatsby develop

@stzonis, @Fluorz

from react-device-detect.

PMhee avatar PMhee commented on September 24, 2024

I'm using version 1.11.13 but it is still bugging.
PS. I have tried to clean and clear cache already but it is not working

from react-device-detect.

gurkerl83 avatar gurkerl83 commented on September 24, 2024

I also confirm that in react-device-detect, version 1.11.13 navigator is not available. I`m using Nextjs, also server side rendered.

from react-device-detect.

SakshiSharma95 avatar SakshiSharma95 commented on September 24, 2024

Hi all, degrade version to '1.5.9', it will work....

from react-device-detect.

duskload avatar duskload commented on September 24, 2024

@gurkerl83 , @SakshiSharma95 , @PMhee , updated package. Please verify if issue still persist

from react-device-detect.

duskload avatar duskload commented on September 24, 2024

Thanks guys!

from react-device-detect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.