I want to learn Meteor but this error is getting on my nerves

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. :roll_eyes: Please direct me to useful sources so I can learn more.

I’m not sure what the actual cause of this is, but it’s giving you the actual line where the error occurs and telling you specifically what the problem is…

If you look at like 618 there, you will see it tries to destructure the program object. For some reason progam is undefined or null and can’t be destructured. I’ve never seen this issue crop up and there aren’t any issues filed on it, but I don’t think this is something that you are specifically causing or an issue with react.

The best thing that can probably be done is to file an issue on github. This seems like something @benjamn or @hwillson would have much more insight into than the general community.

1 Like

@copleykj
Hi, Thanks for replying back. When I restart the project. It starts working and then after some time it throws the same error even if I refresh the page multiple times. No changes to the code… nothing!
Should I open an issue on github?

Which operating system are you using?

Hi @jorgeer. I’m using Windows 10