{"action":"created","issue":{"url":"https://api.github.com/repos/anvaka/ngraph/issues/16","labels_url":"https://api.github.com/repos/anvaka/ngraph/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/anvaka/ngraph/issues/16/comments","events_url":"https://api.github.com/repos/anvaka/ngraph/issues/16/events","html_url":"https://github.com/anvaka/ngraph/issues/16","id":59472375,"number":16,"title":"\"Cannot read property 'util' of undefined\", fabric module not found","user":{"login":"Boogymanx","id":2767030,"avatar_url":"https://avatars.githubusercontent.com/u/2767030?v=3","gravatar_id":"","url":"https://api.github.com/users/Boogymanx","html_url":"https://github.com/Boogymanx","followers_url":"https://api.github.com/users/Boogymanx/followers","following_url":"https://api.github.com/users/Boogymanx/following{/other_user}","gists_url":"https://api.github.com/users/Boogymanx/gists{/gist_id}","starred_url":"https://api.github.com/users/Boogymanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boogymanx/subscriptions","organizations_url":"https://api.github.com/users/Boogymanx/orgs","repos_url":"https://api.github.com/users/Boogymanx/repos","events_url":"https://api.github.com/users/Boogymanx/events{/privacy}","received_events_url":"https://api.github.com/users/Boogymanx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-02T12:00:08Z","updated_at":"2015-03-04T03:18:26Z","closed_at":null,"body":"Hey guys, I'm having a TypeError when trying to use ngraph.fabric. It is in simpleLine.js and it can't find the \"fabric\" module. However, when I run a node shell it can find the package just fine. I've tried pretty much everything that I could think of (uninstalling, reinstalling, reinstalling globally, putting my files in the node_modules folder) and nothing worked. Does anyone know where the issue is? Many thanks in advance! \r\n\r\nhttp://imgur.com/2hXbIyY is the full stack trace"},"comment":{"url":"https://api.github.com/repos/anvaka/ngraph/issues/comments/77090145","html_url":"https://github.com/anvaka/ngraph/issues/16#issuecomment-77090145","issue_url":"https://api.github.com/repos/anvaka/ngraph/issues/16","id":77090145,"user":{"login":"anvaka","id":225407,"avatar_url":"https://avatars.githubusercontent.com/u/225407?v=3","gravatar_id":"","url":"https://api.github.com/users/anvaka","html_url":"https://github.com/anvaka","followers_url":"https://api.github.com/users/anvaka/followers","following_url":"https://api.github.com/users/anvaka/following{/other_user}","gists_url":"https://api.github.com/users/anvaka/gists{/gist_id}","starred_url":"https://api.github.com/users/anvaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anvaka/subscriptions","organizations_url":"https://api.github.com/users/anvaka/orgs","repos_url":"https://api.github.com/users/anvaka/repos","events_url":"https://api.github.com/users/anvaka/events{/privacy}","received_events_url":"https://api.github.com/users/anvaka/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T03:18:26Z","updated_at":"2015-03-04T03:18:26Z","body":"You can follow an example from [`ngraph.fabric`](https://github.com/anvaka/ngraph.fabric).\r\n\r\n```\r\nmkdir example\r\ncd example\r\n```\r\n\r\nThis will just create an `example` folder and switch to it. Then create an empty npm module:\r\n\r\n```\r\necho {} > package.json\r\n```\r\n\r\nNow install `ngraph.fabric`:\r\n\r\n```\r\nnpm i ngraph.fabric\r\n```\r\n\r\nCopy content of `html` file [from here](https://github.com/anvaka/ngraph.fabric/blob/master/example/basic/index.html). Make sure you point to the correct version of `fabric.js` library. This is your `index.js`:\r\n\r\n``` js\r\nmodule.exports.main = function () {\r\n  var graph = require('ngraph.generators').grid(10, 10);\r\n  var createFabric = require('ngraph.fabric');\r\n  var fabricGraphics = createFabric(graph);\r\n\r\n  // begin animation loop:\r\n  fabricGraphics.run();\r\n}\r\n```\r\n\r\nTo compile `bundle.js` run `browserify -s ngraph ./index.js > bundle.js`.\r\n\r\nYou can also consider using [VivaGraph](https://github.com/anvaka/VivaGraphJS), since it's currently built from `ngraph.*` modules itself into single bundle."}}