question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceError: navigator is not defined (remix react)

See original GitHub issue

Hi There, I am trying to use GraphiQL with Hansanghyeon/error-remix-graphiql but I am getting following error:

There was a similar issue. #118

ReferenceError: navigator is not defined
    at /Users/imweb/@lab/blog-tutorial/node_modules/codemirror/lib/codemirror.js:18:19
    at /Users/imweb/@lab/blog-tutorial/node_modules/codemirror/lib/codemirror.js:11:83
    at Object.<anonymous> (/Users/imweb/@lab/blog-tutorial/node_modules/codemirror/lib/codemirror.js:14:2)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /Users/imweb/@lab/blog-tutorial/node_modules/codemirror/addon/hint/show-hint.js:8:9
    at Object.<anonymous> (/Users/imweb/@lab/blog-tutorial/node_modules/codemirror/addon/hint/show-hint.js:13:3)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
thomasheyenbrockcommented, Jul 6, 2022

The fix was just published with @graphiql/react@0.5.0 and graphiql@1.9.11

2reactions
thomasheyenbrockcommented, Jul 6, 2022

Not 100% sure what happens here (I’m not a bundler expert 😅 ), but what I did in #2545 fixed the Remix dev server that I used to replicate the issue locally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: navigator is not defined · Issue #77 - GitHub
Are you using server side rendered react? There won't be a navigator until the doc is ready.
Read more >
Mocha + React: navigator is not defined - Stack Overflow
I'm trying to write the first test for React components and keep getting error: ReferenceError: navigator is not defined.
Read more >
referenceerror: navigator is not defined react - You.com
Probably this package is not suitable for SSR. It seems like it calls navigator without checking availability of the browser api and it...
Read more >
How to fix errors like ReferenceError Window is Not Defined in ...
client to the file name and Remix will not render that file during SSR. Let us see it in action. // file: CodeEditor.client.js...
Read more >
JS Errors - OpenReplay docs
ReferenceError : Navigator is not defined ... Sometimes this error occurs when you try to import tracker-assist or tracker-fetch plugins, this happens because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found