{"action":"opened","issue":{"url":"https://api.github.com/repos/anticoders/gagarin/issues/181","repository_url":"https://api.github.com/repos/anticoders/gagarin","labels_url":"https://api.github.com/repos/anticoders/gagarin/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/anticoders/gagarin/issues/181/comments","events_url":"https://api.github.com/repos/anticoders/gagarin/issues/181/events","html_url":"https://github.com/anticoders/gagarin/issues/181","id":158161233,"number":181,"title":"Why doesn't Npm.require work in server test code ?","user":{"login":"welelay","id":11443077,"avatar_url":"https://avatars.githubusercontent.com/u/11443077?v=3","gravatar_id":"","url":"https://api.github.com/users/welelay","html_url":"https://github.com/welelay","followers_url":"https://api.github.com/users/welelay/followers","following_url":"https://api.github.com/users/welelay/following{/other_user}","gists_url":"https://api.github.com/users/welelay/gists{/gist_id}","starred_url":"https://api.github.com/users/welelay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/welelay/subscriptions","organizations_url":"https://api.github.com/users/welelay/orgs","repos_url":"https://api.github.com/users/welelay/repos","events_url":"https://api.github.com/users/welelay/events{/privacy}","received_events_url":"https://api.github.com/users/welelay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T14:53:48Z","updated_at":"2016-06-02T14:53:48Z","closed_at":null,"body":"I'm still trying to do a simple http.get in my test.\r\n\r\nHere I try to make the server do the work:\r\n\r\n```\r\n    it(\"....\", function() {\r\n        return client\r\n            .execute(function() {\r\n                return computedEnpoint();\r\n            }).then(function(url) {\r\n\r\n                return server.execute(function() {\r\n                    try {\r\n                        console.log(\"Meteor is accessible:\", Meteor.isServer);\r\n                        // either of them fail\r\n                        // var http = Npm.require(\"http\");\r\n                        // require(\"http\");\r\n                    } catch (e) {\r\n                        console.error(\"E:\", e);\r\n                    }\r\n                });\r\n\r\n            });\r\n     });\r\n```\r\nIt fails to find Npm or require, but has Meteor and all my application's module :\r\n```\r\nMeteor is accessible: true\r\nE: [ReferenceError: Npm is not defined]\r\nE: [ReferenceError: require is not defined]\r\n```\r\n\r\nIs there a way to access base modules (not even npm packages) from server code ?"}}
{"actor":{"display_login":"welelay"}}