I have run the following commands:
npm install materialize-css --save
npm install hammerjs --save
npm install jquery --save
And then in my app.js
, var materialize = require('materialize-css');
but I'll always get the same error when I run npm start
:
/Users/myname/code/websites/n-website/node_modules/materialize-css/bin/materialize.js:1
eof require?$=require("jquery"):$}jQuery.easing.jswing=jQuery.easing.swing,jQu
^
TypeError: Cannot read property 'swing' of undefined
at Object.<anonymous> (/Users/nyname/code/websites/n-website/node_modules/materialize-css/bin/materialize.js:1:195)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/myname/code/websites/n-website/app.js:9:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
I can't find anyone else having these issues so it must be the way I'm trying to utilize MaterializeCSS. What am I doing wrong? I just want to be able to display a failure toast using materialize.toast("Message sent", 5000);
. Nothing fancy.