Moment js doesn't seem to work

Hi guys, i keep getting " Uncaught TypeError: moment is not a function" when i try to execute moment() in my code.

I’m on the Meteor 1.1.0.2 and using the official moment js package on atmosphere.

When using Meteor shell, moment() does not return undefined. But it seems like I have problems executing it in my code (i’m only using it in the client)

Anyone knows what’s wrong?

Example code?
I’m using moment just fine but I’m using the mrt:moment-timezone package

1 Like

did you try to run it in your console? Because it is quite strange

yes :frowning: running it in the console gives me the same error.

I’m still getting Uncaught TypeError: moment is not a function

I had errors even running moment() in console.

For some reason, im using the mrt:moment package instead of the momentjs:moment package and it works fine now! Though I get some warning about it being deprecated. Thanks!

Are you using it server-side? Then it is probably this, which should be addressed in the devel branch: https://github.com/moment/moment/issues/2285

Nope! Using it on the client. But I’ve changed the package and it seems to work (for now)