Materialize is not defined


I have add package Materialize

meteor add materialize:materialize

I use on both client side and server side

Materialize.toast(‘Not authorized!’, 4000)

There is not any error on chrome console.
But on server side, it shows the error.


Materialize is only available on the client side, because it’s a front end CSS framework. That’s why the error is on the server and not the client. You should only run Materialize specific functions on the client.