{"action":"created","issue":{"url":"https://api.github.com/repos/kangax/fabric.js/issues/3115","repository_url":"https://api.github.com/repos/kangax/fabric.js","labels_url":"https://api.github.com/repos/kangax/fabric.js/issues/3115/labels{/name}","comments_url":"https://api.github.com/repos/kangax/fabric.js/issues/3115/comments","events_url":"https://api.github.com/repos/kangax/fabric.js/issues/3115/events","html_url":"https://github.com/kangax/fabric.js/issues/3115","id":166053990,"number":3115,"title":"Error: Cannot resolve native modules such as 'canvas' using latest webpack","user":{"login":"kristianmandrup","id":125005,"avatar_url":"https://avatars0.githubusercontent.com/u/125005?v=3","gravatar_id":"","url":"https://api.github.com/users/kristianmandrup","html_url":"https://github.com/kristianmandrup","followers_url":"https://api.github.com/users/kristianmandrup/followers","following_url":"https://api.github.com/users/kristianmandrup/following{/other_user}","gists_url":"https://api.github.com/users/kristianmandrup/gists{/gist_id}","starred_url":"https://api.github.com/users/kristianmandrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristianmandrup/subscriptions","organizations_url":"https://api.github.com/users/kristianmandrup/orgs","repos_url":"https://api.github.com/users/kristianmandrup/repos","events_url":"https://api.github.com/users/kristianmandrup/events{/privacy}","received_events_url":"https://api.github.com/users/kristianmandrup/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-18T09:29:13Z","updated_at":"2017-06-25T09:35:01Z","closed_at":"2016-07-18T10:24:06Z","body":"Installed via npm, using Fabric in Electron React app\n\nWhen I run my app:\n\n```\nERROR in ./~/fabric/dist/fabric.js\n[0] Module not found: Error: Cannot resolve module 'canvas' in /Users/kristianmandrup/repos/electron-apps/fuse-ide/node_modules/fabric/dist\n[0]  @ ./~/fabric/dist/fabric.js 804:15-32 25135:15-32 25136:14-31\n```\n\nOffending code: `require('canvas')`\n\n```\n    createImage: function() {\n      return fabric.isLikelyNode\n        ? new (require('canvas').Image)()\n        : fabric.document.createElement('img');\n    },\n```\n\nAfter install of _fabric_ there is no `canvas` module in `node_modules`\n\nhttps://www.npmjs.com/package/canvas\n\nhttps://github.com/Automattic/node-canvas/wiki/Installation---OSX\n"},"comment":{"url":"https://api.github.com/repos/kangax/fabric.js/issues/comments/310892544","html_url":"https://github.com/kangax/fabric.js/issues/3115#issuecomment-310892544","issue_url":"https://api.github.com/repos/kangax/fabric.js/issues/3115","id":310892544,"user":{"login":"Madhivarman","id":24827454,"avatar_url":"https://avatars1.githubusercontent.com/u/24827454?v=3","gravatar_id":"","url":"https://api.github.com/users/Madhivarman","html_url":"https://github.com/Madhivarman","followers_url":"https://api.github.com/users/Madhivarman/followers","following_url":"https://api.github.com/users/Madhivarman/following{/other_user}","gists_url":"https://api.github.com/users/Madhivarman/gists{/gist_id}","starred_url":"https://api.github.com/users/Madhivarman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Madhivarman/subscriptions","organizations_url":"https://api.github.com/users/Madhivarman/orgs","repos_url":"https://api.github.com/users/Madhivarman/repos","events_url":"https://api.github.com/users/Madhivarman/events{/privacy}","received_events_url":"https://api.github.com/users/Madhivarman/received_events","type":"User","site_admin":false},"created_at":"2017-06-25T09:35:01Z","updated_at":"2017-06-25T09:35:01Z","body":"i tried but still there is an same error..:("}}
{"actor":{"display_login":"Madhivarman"}}