-
Notifications
You must be signed in to change notification settings - Fork 397
Raises "module is undefined" #34
Comments
Perhaps we can move moment-timezone to devDependencies for the time-being. It should probably do the trick for now... |
👍 |
I'm attempting to use moment-timezone in my app via angular-moment and I'm getting the error described here. Does anyone know a solution to get this moment-timezone working properly in an angular app? I installed moment, moment-timezone, and angular-moment via bower, but I couldn't figure out how to get it enabled. I tried updating my imports as follows:
But that doesn't account for the json timezone data file referenced in index.js. Any thoughts how I can remedy this? |
Hi @BirdInTheCity, Which error exactly do you get? Can you please post a plunkr/jsfiddle with the setup that you have that produces the error? Thanks! |
ahh... stupid me. I realized that I needed to include the timezone data in js object form from the site. Once that was added, it worked correctly. |
Excellent, glad to hear you managed to find the solution :-) |
@BirdInTheCity man, could you please say where you added the js object? |
When running on the latest angular-moment.
moment-timezone
is declared as a dependency. moment-timezone'sbower.json
declaresindex.js
(https://github.com/moment/moment-timezone/blob/27a88581c0d44c557d5122cde9946043fa1da94d/index.js) as its main entry point. This file depends on a module loading system to be present, which is not declared as a dependency ofmoment-timezone
,moment
orangular-moment
. The result is an exception for module being undefined. Related: moment/moment-timezone#59The text was updated successfully, but these errors were encountered: