-
Notifications
You must be signed in to change notification settings - Fork 397
Moment is undefined #79
Comments
I have the same problem but your solution does not work for me .. Using Angularjs/Ionic |
It's a "problem" with moment.js according to this issue. The workaround mentioned there worked for me. |
The thing is if I don't put moment.js in bower.json and use it via that then angular-moment has a broken dependency when checking bower list, which is not too nice also. Actually moment-timezone has the same issue with it: moment/moment-timezone#128 |
…de-webkit or atom-shell
I ran into this issue in atom-shell (similar to node-webkit). I fixed it with the following fix and adding moment to my local npm file, this way moment is used locally. |
Should be resolved by #95. If there are still issues, please re-open (or even better - send a PR). |
This still isn't fixed. I have submitted a pull request: #133 |
I also get the issue. I run: but when I webpack it and open the browser, it said : Any one can help? Thanks! |
I have the same issue, the solution doesn't work in my project |
I solved it for my project. The issue is related to Webpack, and is similar to an issue where the jQuery global is not being found.
|
@vanhumbeecka Thank you for your reply. Not very clean, but it solves my problem. Here what I did: |
@vanhumbeecka that works for me, thank you. |
Using angularjs, node-webkit and angular-moment together I always got errors related to moment being undefined.
As I changed
.constant('moment', moment)
to
.constant('moment', (typeof global !== 'undefined' ? global : this).moment)
in angular-moment.js it stopped to complain. I don't know if it makes any problem in other environments though.
The text was updated successfully, but these errors were encountered: