{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/simple-todos-react/issues/29","repository_url":"https://api.github.com/repos/meteor/simple-todos-react","labels_url":"https://api.github.com/repos/meteor/simple-todos-react/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/meteor/simple-todos-react/issues/29/comments","events_url":"https://api.github.com/repos/meteor/simple-todos-react/issues/29/events","html_url":"https://github.com/meteor/simple-todos-react/issues/29","id":153256191,"number":29,"title":"App crashing after modifying App component in App.jsx to get tasks from mongo collection","user":{"login":"josephgodwinkimani","id":13916761,"avatar_url":"https://avatars.githubusercontent.com/u/13916761?v=3","gravatar_id":"","url":"https://api.github.com/users/josephgodwinkimani","html_url":"https://github.com/josephgodwinkimani","followers_url":"https://api.github.com/users/josephgodwinkimani/followers","following_url":"https://api.github.com/users/josephgodwinkimani/following{/other_user}","gists_url":"https://api.github.com/users/josephgodwinkimani/gists{/gist_id}","starred_url":"https://api.github.com/users/josephgodwinkimani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephgodwinkimani/subscriptions","organizations_url":"https://api.github.com/users/josephgodwinkimani/orgs","repos_url":"https://api.github.com/users/josephgodwinkimani/repos","events_url":"https://api.github.com/users/josephgodwinkimani/events{/privacy}","received_events_url":"https://api.github.com/users/josephgodwinkimani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-05-05T15:25:07Z","updated_at":"2016-09-10T15:55:06Z","closed_at":null,"body":"I followed the Todo App with React  tutorial in [meteor.js website](https://www.meteor.com/tutorials/react/collections) and got my app crashing due to gap in line 15 to 27 which is indicated as _\"...some lines skipped...\"._ I tried a workaround by deleting\r\n\r\n```\r\n   ...some lines skipped...\r\n       );\r\n }\r\n```\r\nIt is here that now I proceed to create my to-do collection using mongo console :`db.tasks.insert({ text: \"Hello world!\", createdAt: new Date() });` where afterwards I got the app showing nothing (totally blank) with just styling in place.\r\n\r\nI proceeded to adding a form, input field and a handleSubmit method to App component of App.jsx like this:\r\n\r\n```\r\n// imports/ui/App.jsx\r\nimport React, { Component, PropTypes } from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { createContainer } from 'meteor/react-meteor-data';\r\n \r\nimport { Tasks } from '../api/tasks.js';\r\n...some lines skipped...\r\n \r\n// App component - represents the whole app\r\n// handleSubmit method - starts here -\r\nclass App extends Component {\r\n  handleSubmit(event) {\r\n    event.preventDefault();\r\n \r\n    // Find the text field via the React ref\r\n    const text = ReactDOM.findDOMNode(this.refs.textInput).value.trim();\r\n \r\n    Tasks.insert({\r\n      text,\r\n      createdAt: new Date(), // current time\r\n    });\r\n \r\n    // Clear form\r\n    ReactDOM.findDOMNode(this.refs.textInput).value = '';\r\n  }\r\n \r\n  renderTasks() {\r\n    return this.props.tasks.map((task) => (\r\n      <Task key={task._id} task={task} />\r\n```\r\n\r\nComparing tutorial at [meteor.js website](https://www.meteor.com/tutorials/react/collections) and the one on github which after download the zip file are different. Moreover, both Apps crashed... \r\n\r\nI am confused considering I have the latest meteor.js installation."},"comment":{"url":"https://api.github.com/repos/meteor/simple-todos-react/issues/comments/246119400","html_url":"https://github.com/meteor/simple-todos-react/issues/29#issuecomment-246119400","issue_url":"https://api.github.com/repos/meteor/simple-todos-react/issues/29","id":246119400,"user":{"login":"andrewlintz","id":5333060,"avatar_url":"https://avatars.githubusercontent.com/u/5333060?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewlintz","html_url":"https://github.com/andrewlintz","followers_url":"https://api.github.com/users/andrewlintz/followers","following_url":"https://api.github.com/users/andrewlintz/following{/other_user}","gists_url":"https://api.github.com/users/andrewlintz/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewlintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewlintz/subscriptions","organizations_url":"https://api.github.com/users/andrewlintz/orgs","repos_url":"https://api.github.com/users/andrewlintz/repos","events_url":"https://api.github.com/users/andrewlintz/events{/privacy}","received_events_url":"https://api.github.com/users/andrewlintz/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T15:55:06Z","updated_at":"2016-09-10T15:55:06Z","body":"I'm experiencing same issue... \r\nSpecifically occurs between Tutorial Module: 3.1, 3.2, 3.4.\r\n\r\n It's >Unable to resolve some modules:  \"../api/tasks.js\" in  /imports/ui/App.jsx &  \"../imports/api/tasks.js\" in  /server/main.js\r\n\r\n\r\n\r\nI've included the error message from OSX's terminal below.\r\n\r\n>Unable to resolve some modules:\r\n\r\n>  \"../api/tasks.js\" in /Users/MyUserName/Github/2016.07.19_meteor_01/2016.09.09_meteor_React_todos/simple-todos/imports/ui/App.jsx (web.browser)\r\n                                              \r\n                                              \r\n>Unable to resolve some modules:\r\n\r\n>  \"../imports/api/tasks.js\" in /Users/MyUserName/Github/2016.07.19_meteor_01/2016.09.09_meteor_React_todos/simple-todos/server/main.js (os.osx.x86_64)\r\n                                              \r\n>W20160910-06:54:05.088(-5)? (STDERR) /Users/MyUserName/.meteor/packages/meteor-tool/.1.4.1_1.k69xw7++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280\r\nW20160910-06:54:05.095(-5)? (STDERR) \t\t\t\t\t\tthrow(ex);\r\nW20160910-06:54:05.100(-5)? (STDERR) \t\t\t\t\t\t^\r\nW20160910-06:54:05.100(-5)? (STDERR) \r\nW20160910-06:54:05.101(-5)? (STDERR) Error: Cannot find module '../imports/api/tasks.js'\r\nW20160910-06:54:05.101(-5)? (STDERR)     at Function.require.resolve (packages/modules-runtime/.npm/package/node_modules/install/install.js:101:1)\r\nW20160910-06:54:05.101(-5)? (STDERR)     at Module.resolve (packages/modules-runtime/.npm/package/node_modules/install/install.js:57:1)\r\nW20160910-06:54:05.101(-5)? (STDERR)     at Module.Mp.import (/Users/MyUserName/.meteor/packages/modules/.0.7.6.1aw7sk0++os+web.browser+web.cordova/npm/node_modules/reify/lib/runtime.js:61:29)\r\nW20160910-06:54:05.101(-5)? (STDERR)     at meteorInstall.server.main.js (server/main.js:1:8)\r\nW20160910-06:54:05.102(-5)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)\r\nW20160910-06:54:05.104(-5)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)\r\nW20160910-06:54:05.104(-5)? (STDERR)     at /Users/MyUserName/Github/2016.07.19_meteor_01/2016.09.09_meteor_React_todos/simple-todos/.meteor/local/build/programs/server/app/app.js:13:1\r\nW20160910-06:54:05.105(-5)? (STDERR)     at /Users/MyUserName/Github/2016.07.19_meteor_01/2016.09.09_meteor_React_todos/simple-todos/.meteor/local/build/programs/server/boot.js:292:10\r\nW20160910-06:54:05.105(-5)? (STDERR)     at Array.forEach (native)\r\nW20160910-06:54:05.114(-5)? (STDERR)     at Function._.each._.forEach (/Users/MyUserName/.meteor/packages/meteor-tool/.1.4.1_1.k69xw7++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)\r\n=> Exited with code: 1\r\n"}}
{"actor":{"display_login":"andrewlintz"}}