{"action":"created","issue":{"url":"https://api.github.com/repos/Asana/node-asana/issues/114","repository_url":"https://api.github.com/repos/Asana/node-asana","labels_url":"https://api.github.com/repos/Asana/node-asana/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/Asana/node-asana/issues/114/comments","events_url":"https://api.github.com/repos/Asana/node-asana/issues/114/events","html_url":"https://github.com/Asana/node-asana/issues/114","id":136076562,"number":114,"title":"Require packge.json and readline errors with webpack","user":{"login":"skinofstars","id":50792,"avatar_url":"https://avatars.githubusercontent.com/u/50792?v=3","gravatar_id":"","url":"https://api.github.com/users/skinofstars","html_url":"https://github.com/skinofstars","followers_url":"https://api.github.com/users/skinofstars/followers","following_url":"https://api.github.com/users/skinofstars/following{/other_user}","gists_url":"https://api.github.com/users/skinofstars/gists{/gist_id}","starred_url":"https://api.github.com/users/skinofstars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skinofstars/subscriptions","organizations_url":"https://api.github.com/users/skinofstars/orgs","repos_url":"https://api.github.com/users/skinofstars/repos","events_url":"https://api.github.com/users/skinofstars/events{/privacy}","received_events_url":"https://api.github.com/users/skinofstars/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T14:27:38Z","updated_at":"2016-03-08T13:45:35Z","closed_at":null,"body":"Hey. \r\n\r\nWe've been getting issues with using this webpack. Kinda came as a double error\r\n\r\n```\r\nERROR in ./~/asana/package.json\r\nModule parse failed: /Users/kevin/projects/.../node_modules/asana/package.json Line 2: Unexpected token :\r\nYou may need an appropriate loader to handle this file type.\r\n| {\r\n|   \"_args\": [\r\n|     [\r\n|       \"asana\",\r\n @ ./~/asana/index.js 7:18-43\r\n\r\nERROR in ./~/asana/lib/auth/native_flow.js\r\nModule not found: Error: Cannot resolve module 'readline' in /Users/kevin/projects/.../node_modules/asana/lib/auth\r\n @ ./~/asana/lib/auth/native_flow.js 1:15-34\r\n```\r\n\r\nResolution to the first was to add `.json` to our webpack resolve extensions config. \r\n```\r\nresolve: {\r\n  extensions: ['', '.js', '.jsx', '.json', '.scss']\r\n}\r\n```\r\nThis is all because teh dispatcher.js does `var VERSION = require('../package.json').version`\r\n\r\nSecond was kinda weirder, we added to our webpack config\r\n\r\n```\r\nnode: {\r\n  readline: 'empty'\r\n}\r\n```\r\n\r\nWe've got it running now, but it was a bit of a pain.\r\n\r\nHope that helps someone"},"comment":{"url":"https://api.github.com/repos/Asana/node-asana/issues/comments/193790887","html_url":"https://github.com/Asana/node-asana/issues/114#issuecomment-193790887","issue_url":"https://api.github.com/repos/Asana/node-asana/issues/114","id":193790887,"user":{"login":"skinofstars","id":50792,"avatar_url":"https://avatars.githubusercontent.com/u/50792?v=3","gravatar_id":"","url":"https://api.github.com/users/skinofstars","html_url":"https://github.com/skinofstars","followers_url":"https://api.github.com/users/skinofstars/followers","following_url":"https://api.github.com/users/skinofstars/following{/other_user}","gists_url":"https://api.github.com/users/skinofstars/gists{/gist_id}","starred_url":"https://api.github.com/users/skinofstars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skinofstars/subscriptions","organizations_url":"https://api.github.com/users/skinofstars/orgs","repos_url":"https://api.github.com/users/skinofstars/repos","events_url":"https://api.github.com/users/skinofstars/events{/privacy}","received_events_url":"https://api.github.com/users/skinofstars/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T13:45:35Z","updated_at":"2016-03-08T13:45:35Z","body":"Hmm, perhaps as part of you build step, you just write it to a file? I'd say have a look at the way others do it, like pouchdb has a release.sh https://github.com/pouchdb/pouchdb/blob/2be37213b03c5d5da1d79bf8b714dd8fba8c09d1/bin/release.sh"}}