andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.54k stars 305 forks source link

Unable to use sugar-date on server-side with meteor/nodejs #640

Closed WayneUong closed 5 years ago

WayneUong commented 6 years ago
var Sugar = require('sugar-date');
console.log(Sugar.Date())

gives me TypeError: Sugar.Date is not a function

andrewplummer commented 5 years ago

Hi sorry for the delay... were you able to figure this one out? I have no trouble installing sugar-date and using it like this out of the box... it's unlikely that meteor could be messing with basic import/exports so maybe something else was missing here?

andrewplummer commented 5 years ago

Going to close this one out as I wasn't able to reproduce it, even after using in conjunction with Meteor... seems like something else must be at play here. If you still are having trouble please feel fre to reopen but if you can provide some more context it would be helpful.