-
Notifications
You must be signed in to change notification settings - Fork 397
TypeError: Cannot read property 'utc' of undefined #194
Comments
Can you verify that Please try opening the chrome devtools and typing there Thx |
First thing I did before creating this post :) |
thanks, are you using the latest version of |
used bower to install so I guess yes? Also checked top of the js file : /* angular-moment.js / v0.10.3 / (c) 2013, 2014, 2015 Uri Shaked / MIT Licence */ well I guess no now when I checked the repo compared to my js file. |
bower install does not currently pull the beta version, please try installing the beta by writing:
thanks! |
Still.. |
Can you put a breakpoint at angular-moment.js line 98 and see what the value of thx |
|
For some reason, |
I can do that certainly, But I came to believe now it might be nw.js (formerly known as node-webkit) that is the culprit here? EDIT: tried using npm and: var moment = require('moment'); still no dice. |
Actually yes, see #104 |
I actually looked over that issue before I created this, and thought I post anyways. But as you can see even using node.js's require doesn't work. |
Can you try changing line 662 to read:
instead of
and check if it fixes the issue ? |
same error still.. |
Interesting... Are you using moment 2.10.3? Someone noted on #104 that upgrading to 2.10.3 helped solve a similar problem with nw.js |
I was using 2.10.6, downgraded to 2.10.3, still no dice. |
So both when using bower and npm, |
That's right. |
Okay, do you want to try debugging it and coming back with some conclusions why it happens? Alternatively, if you can create a small example that reproduces this behavior, I can look into it... |
Okay, kind of "solved" it...
But got a deprecation warning saying moment falls back to js Date and everything becomes "Invalid date." |
Do you get the warning when using The deprecation warnings appears when you pass |
Yes.
Yea I read about that @ the linked github issue. |
Seems like others are also facing similar issues, e.g. nwjs/nw.js#2075. Very strange that the Date stuff doesn't work - can you please double-verify by logging the value which is passed to |
It returns nothing, its blank. Thought I broke it at first but its just nothing... It no longer says invalid date though... but nothing gets returned. |
and what does it get (inside the does Uri |
I feel embarrassed... Sorry for taking up your time on this latest issue of the new Date() thing... I accidentally closed down my powershell which had gulp watch running... Took me a while to figure out why the hell my js didnt update... Well I got the am-time-ago working in a ng-repeat a little while ago and I was stunned the new Date() thing didn't... So again I'm sorry.. However, Now when its working wonders I would like to give me two thanks for helping me with this, you've been really helpful! Not many people I know are being this helpful and actually taking the time to resolve it. I would also like to add, If you could do a check for moment already before:
And then throw an error if you can't find it, Would make sense right? it would be really helpful for others. And also, document the solution I had to use to make it work for nw.js would also be helpful for others. Again, thank you very much! |
No worries :) Yes, I think that adding a check at the beginning of the function and throwing a more descriptive error if Uri |
PR submitted. |
great! On Sun, Nov 8, 2015 at 3:23 AM, Marcus notifications@github.com wrote:
|
Fixed by #196 |
The text was updated successfully, but these errors were encountered: