{"action":"created","issue":{"url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/438","repository_url":"https://api.github.com/repos/PAIR-code/deeplearnjs","labels_url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/438/labels{/name}","comments_url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/438/comments","events_url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/438/events","html_url":"https://github.com/PAIR-code/deeplearnjs/issues/438","id":281823151,"number":438,"title":"NDArrayMathCPU and node.js not OK in 0.3.14","user":{"login":"mikkokam","id":4678216,"avatar_url":"https://avatars2.githubusercontent.com/u/4678216?v=4","gravatar_id":"","url":"https://api.github.com/users/mikkokam","html_url":"https://github.com/mikkokam","followers_url":"https://api.github.com/users/mikkokam/followers","following_url":"https://api.github.com/users/mikkokam/following{/other_user}","gists_url":"https://api.github.com/users/mikkokam/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkokam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkokam/subscriptions","organizations_url":"https://api.github.com/users/mikkokam/orgs","repos_url":"https://api.github.com/users/mikkokam/repos","events_url":"https://api.github.com/users/mikkokam/events{/privacy}","received_events_url":"https://api.github.com/users/mikkokam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-13T16:58:43Z","updated_at":"2017-12-20T14:06:08Z","closed_at":null,"author_association":"NONE","body":"When running in node.js\r\n`const math = new NDArrayMathCPU();`\r\nwill fail -- seems to be trying to use `document`.\r\n\r\nolder versions work OK for node.js + NDArrayMathCPU.\r\n\r\n```\r\n/Users/mikkokam/Documents/git/kerasapi/node_modules/deeplearn/dist/math/backends/webgl/webgl_util.js:7\r\n    var canvas = document.createElement('canvas');\r\n                 ^\r\nReferenceError: document is not defined\r\n    at Object.createWebGLRenderingContext (/Users/mikkokam/Documents/git/kerasapi/node_modules/deeplearn/dist/math/backends/webgl/webgl_util.js:7:18)\r\n```"},"comment":{"url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/comments/353071658","html_url":"https://github.com/PAIR-code/deeplearnjs/issues/438#issuecomment-353071658","issue_url":"https://api.github.com/repos/PAIR-code/deeplearnjs/issues/438","id":353071658,"user":{"login":"erikwilson","id":1999874,"avatar_url":"https://avatars2.githubusercontent.com/u/1999874?v=4","gravatar_id":"","url":"https://api.github.com/users/erikwilson","html_url":"https://github.com/erikwilson","followers_url":"https://api.github.com/users/erikwilson/followers","following_url":"https://api.github.com/users/erikwilson/following{/other_user}","gists_url":"https://api.github.com/users/erikwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/erikwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikwilson/subscriptions","organizations_url":"https://api.github.com/users/erikwilson/orgs","repos_url":"https://api.github.com/users/erikwilson/repos","events_url":"https://api.github.com/users/erikwilson/events{/privacy}","received_events_url":"https://api.github.com/users/erikwilson/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T14:06:08Z","updated_at":"2017-12-20T14:06:08Z","author_association":"NONE","body":"Thanks for addressing this! I know I have lost a few cycles trying to shim this for previous versions when it cropped up. It looks like some more environment tests using karma were added but I wonder if some CPU tests using mocha might help bridge the gap for node. It seems like the team is mostly focused on browser support but it would be nice if a versioned fix were released as soon as possible for these types of issues. "}}
{"actor":{"display_login":"erikwilson"}}