Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Raises "module is undefined" #34

Closed
tastycode opened this issue Feb 4, 2014 · 7 comments
Closed

Raises "module is undefined" #34

tastycode opened this issue Feb 4, 2014 · 7 comments

Comments

@tastycode
Copy link

When running on the latest angular-moment. moment-timezone is declared as a dependency. moment-timezone's bower.json declares index.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 of moment-timezone, moment or angular-moment. The result is an exception for module being undefined. Related: moment/moment-timezone#59

@urish
Copy link
Owner

urish commented Feb 4, 2014

Perhaps we can move moment-timezone to devDependencies for the time-being. It should probably do the trick for now...

@tastycode
Copy link
Author

👍

@urish urish closed this as completed in b863b5d Feb 5, 2014
@BirdInTheCity
Copy link

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:

    <script src="bower_components/moment/moment.js"></script>
    <script src="bower_components/moment-timezone/moment-timezone.js"></script>
    <script src="bower_components/angular-moment/angular-moment.js"></script>

But that doesn't account for the json timezone data file referenced in index.js. Any thoughts how I can remedy this?

@urish
Copy link
Owner

urish commented Mar 29, 2014

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!

@BirdInTheCity
Copy link

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.

@urish
Copy link
Owner

urish commented Apr 2, 2014

Excellent, glad to hear you managed to find the solution :-)

@cepinos
Copy link

cepinos commented Apr 4, 2014

@BirdInTheCity man, could you please say where you added the js object?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants