Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

check is not defined in meteor.js

Tags:

meteor

I am new to meteor, I was trying to use file upload using tomitrescak/meteor-uploads

I successfully uploaded some file, but when I tried to delete the uploaded file, I got error in my terminal Reference Error:check is not defined

I have checked the documentation and searched the web regarding this error but could not find any solution for this.

Note: I got similar error while studing http://meteortips.com/second-meteor-tutorial/iron-router-part-1/

OS: Ubuntu 14.04 meteor: 1.2.1

like image 601
AMahajan Avatar asked Nov 04 '15 11:11

AMahajan


1 Answers

TL;DR

$ meteor add check

Longer version

In Meteor version prior to v1.2, a core package called meteor-platform used to export some symbols, including check.

Since v1.2, this is no longer the case and those symbols are no longer available via the platform, but using dedicated packages instead.

It is likely that one of the packages that you are using (or your app code itself) is using check (probably in one of its methods) without declaring it as a dependency.

Until the package maintainers update the dependency, you should be able to overcome the error by adding check as a top-level dependency:

$ meteor add check

If you identify which package is causing the issue, you can report it on GitHub, or fork the package yourself, add the missing dependencies and submit a pull-request.

like image 117
MasterAM Avatar answered Sep 30 '22 13:09

MasterAM