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

window is not defined in SSR mode @0.14.0 #942

Closed
Fi1osof opened this issue Aug 19, 2019 · 5 comments
Closed

window is not defined in SSR mode @0.14.0 #942

Fi1osof opened this issue Aug 19, 2019 · 5 comments

Comments

@Fi1osof
Copy link

Fi1osof commented Aug 19, 2019

See title. @0.13.2 all OK

(node:22785) ExperimentalWarning: The ESM module loader is experimental.
18|uae-realty-front:3820  | modules/Avatar deprecated. Use ui/Avatar instead
18|uae-realty-front:3820  | ReferenceError: window is not defined
18|uae-realty-front:3820  |     at Object.<anonymous> (/var/www/uae/uae-realty/node_modules/graphiql/dist/utility/commonKeys.js:12:15)
18|uae-realty-front:3820  |     at Module._compile (internal/modules/cjs/loader.js:688:30)
18|uae-realty-front:3820  |     at Module._compile (/var/www/uae/uae-realty/node_modules/pirates/lib/index.js:99:24)
18|uae-realty-front:3820  |     at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
18|uae-realty-front:3820  |     at Object.newLoader [as .js] (/var/www/uae/uae-realty/node_modules/pirates/lib/index.js:104:7)
18|uae-realty-front:3820  |     at Module.load (internal/modules/cjs/loader.js:598:32)
18|uae-realty-front:3820  |     at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
18|uae-realty-front:3820  |     at Function.Module._load (internal/modules/cjs/loader.js:529:3)
18|uae-realty-front:3820  |     at Module.require (internal/modules/cjs/loader.js:636:17)
18|uae-realty-front:3820  |     at require (internal/modules/cjs/helpers.js:20:18)

@acao
Copy link
Member

acao commented Aug 19, 2019

my bad, we let this one pass through the other day, I'm on it!

const isMacOs = window.navigator.platform === 'MacIntel';

@Fi1osof
Copy link
Author

Fi1osof commented Aug 19, 2019

Will wait updates. Thanks!
Now use 0.13.2 yet.

acao added a commit that referenced this issue Aug 19, 2019
acao added a commit that referenced this issue Aug 19, 2019
- dont expect window to be present for extraKeys MacOs detection logic
- use existing graphiql convention for detecting the presence of window
@acao acao closed this as completed in a2f7f13 Aug 19, 2019
@acao
Copy link
Member

acao commented Aug 19, 2019

@Fi1osof - 0.14.1 released! SSR is my bread and butter so that was embarassing. good thing we caught it early, thanks!

@acao acao reopened this Aug 19, 2019
@benjie
Copy link
Member

benjie commented Aug 19, 2019

@acao Did you mean to re-open this?

@Fi1osof
Copy link
Author

Fi1osof commented Aug 19, 2019

@acao, thanks!

@acao acao closed this as completed Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants