ReferenceError: navigator is not defined (remix react)
See original GitHub issueHi 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:
- Created a year ago
- Reactions:7
- Comments:14 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix was just published with
@graphiql/react@0.5.0
andgraphiql@1.9.11
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.