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

ReferenceError: window is not defined #36

Closed
acrogenesis opened this issue Feb 12, 2019 · 2 comments
Closed

ReferenceError: window is not defined #36

acrogenesis opened this issue Feb 12, 2019 · 2 comments

Comments

@acrogenesis
Copy link

When using absinthe-socket in node (without a browser) I get that error:

/Users/acrogenesis/Documents/Development/relationTest/node_modules/phoenix/priv/static/phoenix.js:1
(function (exports, require, module, __filename, __dirname) { !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Phoenix=t():e.Phoenix=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"st

ReferenceError: window is not defined
    at Object.<anonymous> (/Users/acrogenesis/Documents/Development/relationTest/node_modules/phoenix/priv/static/phoenix.js:1:258)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/acrogenesis/Documents/Development/relationTest/node_modules/@absinthe/socket/compat/cjs/index.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:734:30)

If I downgrade to 0.1 it works.

@benwilson512
Copy link
Contributor

That error comes from within phoenix.js, I don't think it has anything to do with this project specifically.

@acrogenesis
Copy link
Author

You are right @benwilson512, for future reference it seems it's getting fixed phoenixframework/phoenix@60fce56

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

2 participants