I’m just starting out Meteor. I’m following the Todo App tutorial that meteor provides. I don’t know why after some time meteor automatically stops running and throws this error
=> Meteor server restarted
Exception from task TypeError: Cannot destructure property `unpause` of 'undefined' or 'null'.
at syncQueue.runTask (packages/webapp/webapp_server.js:618:27)
at runWithEnvironment (packages\meteor.js:1286:24)
at Object.task (packages\meteor.js:1299:14)
at Meteor._SynchronousQueue.SQp._run (packages\meteor.js:917:16)
at packages\meteor.js:894:12
Errors prevented startup:
While running post-startup callbacks:
error: Cannot destructure property `unpause` of 'undefined' or 'null'.
Your application has errors. Waiting for file change.
I don’t know what is the problem. But I think this code has some problem as soon as I write event.target it shows that error and it continues to show it even when I remove that line
Template.form.events({
'submit .new-task': (event) => {
event.preventDefault();
const target = event.target;
const text = target.text.value;
console.log(text)
}
})
This is my template
<template name="form">
<form class="new-task" style="margin: 10px 10px; padding: 0 10px; border-bottom: 1px solid #c4c4c4; ">
<input type="text" name="text" placeholder="Type to add new tasks" />
</form>
</template>
It was throwing kind of a similar error with React also when I was trying to use higher order components. And then it suddenly started working. I don’t know how!
Everyone is praising Meteor how easy it is to get started blah blah blah. But I find it very strange because it doesn’t give a specific error about which line is causing problem. Please direct me to useful sources so I can learn more.