{"action":"created","issue":{"url":"https://api.github.com/repos/Hashnode/mern-starter/issues/224","repository_url":"https://api.github.com/repos/Hashnode/mern-starter","labels_url":"https://api.github.com/repos/Hashnode/mern-starter/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/Hashnode/mern-starter/issues/224/comments","events_url":"https://api.github.com/repos/Hashnode/mern-starter/issues/224/events","html_url":"https://github.com/Hashnode/mern-starter/issues/224","id":171802317,"number":224,"title":"What is the right way to create a module and add new route?","user":{"login":"kieusonlam","id":13093313,"avatar_url":"https://avatars.githubusercontent.com/u/13093313?v=3","gravatar_id":"","url":"https://api.github.com/users/kieusonlam","html_url":"https://github.com/kieusonlam","followers_url":"https://api.github.com/users/kieusonlam/followers","following_url":"https://api.github.com/users/kieusonlam/following{/other_user}","gists_url":"https://api.github.com/users/kieusonlam/gists{/gist_id}","starred_url":"https://api.github.com/users/kieusonlam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kieusonlam/subscriptions","organizations_url":"https://api.github.com/users/kieusonlam/orgs","repos_url":"https://api.github.com/users/kieusonlam/repos","events_url":"https://api.github.com/users/kieusonlam/events{/privacy}","received_events_url":"https://api.github.com/users/kieusonlam/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-18T02:08:48Z","updated_at":"2016-11-18T15:12:17Z","closed_at":"2016-08-31T05:43:40Z","body":"Hi everone,\n\nI just know the basic of React Redux, and i need your help :)\n\nI found MERN and I using it to make an small app to learn. I clone mern-start and use mern-cli to create a Test module. I just simple render a Hello World text.\n\n```\nclass Test extends Component {\n  render() {\n    return (\n      <div>Hello World</div>\n    );\n  }\n}\n```\n\nthen i go to /client/route.js and add a new route under post route.\n\n```\n<Route\n      path=\"/test\"\n      getComponent={(nextState, cb) => {\n        require.ensure([], require => {\n          cb(null, require('./modules/Test/Test').default);\n        });\n      }}\n    />\n```\n\nrestart from console and i got this error\n\n```\nC:\\Users\\kieus\\Desktop\\MERN\\client\\modules\\Auth\\Auth.js:17\nvar _Auth = content.locals;\n            ^\n\nReferenceError: content is not defined\n    at Object.<anonymous> (Auth.js:6:1)\n    at Module._compile (module.js:541:32)\n    at loader (C:\\Users\\kieus\\Desktop\\MERN\\node_modules\\babel-register\\lib\\node.js:148:5)\n    at Object.require.extensions.(anonymous function) [as .js] (C:\\Users\\kieus\\Desktop\\MERN\\node_modules\\babel-register\\lib\\node.js:158:7)\n    at Module.load (module.js:458:32)\n    at tryModuleLoad (module.js:417:12)\n    at Function.Module._load (module.js:409:3)\n    at Module.require (module.js:468:17)\n    at require (internal/module.js:20:19)\n    at Object.<anonymous> (routes.js:21:3)\n    at Module._compile (module.js:541:32)\n    at loader (C:\\Users\\kieus\\Desktop\\MERN\\node_modules\\babel-register\\lib\\node.js:148:5)\n    at Object.require.extensions.(anonymous function) [as .js] (C:\\Users\\kieus\\Desktop\\MERN\\node_modules\\babel-register\\lib\\node.js:158:7)\n    at Module.load (module.js:458:32)\n    at tryModuleLoad (module.js:417:12)\n    at Function.Module._load (module.js:409:3)\n [nodemon] app crashed - waiting for file changes before starting...\n```\n\nam i missing something? What i have to do to make it right :(\n\nAlso css background not working in development mode right?\n\nIs there any tutorial about MERN for beginer like: create basic module, jwt authentication?\n\nI know too many questions. Please help me Thanks.\n"},"comment":{"url":"https://api.github.com/repos/Hashnode/mern-starter/issues/comments/261554981","html_url":"https://github.com/Hashnode/mern-starter/issues/224#issuecomment-261554981","issue_url":"https://api.github.com/repos/Hashnode/mern-starter/issues/224","id":261554981,"user":{"login":"sham3k","id":4112785,"avatar_url":"https://avatars.githubusercontent.com/u/4112785?v=3","gravatar_id":"","url":"https://api.github.com/users/sham3k","html_url":"https://github.com/sham3k","followers_url":"https://api.github.com/users/sham3k/followers","following_url":"https://api.github.com/users/sham3k/following{/other_user}","gists_url":"https://api.github.com/users/sham3k/gists{/gist_id}","starred_url":"https://api.github.com/users/sham3k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sham3k/subscriptions","organizations_url":"https://api.github.com/users/sham3k/orgs","repos_url":"https://api.github.com/users/sham3k/repos","events_url":"https://api.github.com/users/sham3k/events{/privacy}","received_events_url":"https://api.github.com/users/sham3k/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T15:12:17Z","updated_at":"2016-11-18T15:12:17Z","body":"Downgrading to Webpack ^1.13.3 solved it. Strange bug, though."}}
{"actor":{"display_login":"sham3k"}}