# Ionic 2 moment-timze is not able to find tz method

**URL:** <https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733>\
**Category:** ionic-v3\
**Created:** [January 10, 2017, 9:40am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733 "2017-01-10T09:40:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 9:40am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/1 "2017-01-10T09:40:50Z")

</div>

Hi,  
I am installing moment package but , its method tz everytime gives Error - not able to find but other method working fine.

Please tell me what is moment timzone command?

Thanks

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [January 10, 2017, 10:09am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/2 "2017-01-10T10:09:12Z")

</div>

and you installed both:

- moment
- moment-timezone

?

---

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 10:10am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/3 "2017-01-10T10:10:39Z")

</div>

yes, I have installed both. And I am following [http://ionicframework.com/docs/v2/faq/](http://ionicframework.com/docs/v2/faq/).

Also try to installed using typings.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [January 10, 2017, 10:13am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/4 "2017-01-10T10:13:03Z")

</div>

okay so you ran:

`npm i @types/moment-timezone --save-dev`

already?

---

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 10:14am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/5 "2017-01-10T10:14:51Z")

</div>

not using @types

Using-  
$ npm install -g typings  
$ typings search moment  
$ typings install dt~moment --save  
$ typings install dt~moment-timezone --save --global

Where dt is source to install moment-timezone and --global is required.

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [January 10, 2017, 10:17am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/6 "2017-01-10T10:17:07Z")

</div>

pls try my command. in newer versions typings are stored under @types

---

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 10:18am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/7 "2017-01-10T10:18:29Z")

</div>

Ok, I will try do that. But what I will code at top to import.  
Eg.-  
import \* as moment from ‘moment’;

then for moment-timezone?

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [January 10, 2017, 10:22am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/8 "2017-01-10T10:22:00Z")

</div>

yeah maybe:

`import moment from 'moment'; import 'moment-timezone';`  
something like that. you have to play around a little bit on your own

---

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 10:24am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/9 "2017-01-10T10:24:24Z")

</div>

Getting error -  
Uncaught Error: Cannot find module "./data/packed/latest.json"  
at webpackMissingModule (main.js:122432)  
at Object. (main.js:122432)  
at **webpack\_require** (main.js:20)  
at Object. (main.js:44108)  
at **webpack\_require** (main.js:20)  
at Object. (main.js:44208)  
at **webpack\_require** (main.js:20)  
at Object. (main.js:101584)  
at **webpack\_require** (main.js:20)  
at Object. (main.js:101495)

---

<div class="post-metadata">

**Author:** ![bengtler](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bengtler/32/98565_2.png) [@bengtler](https://forum.ionicframework.com/u/bengtler)\
**Post date:** [January 10, 2017, 1:08pm UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/10 "2017-01-10T13:08:34Z")

</div>

yeah, but that looks like you have an invalid path somewhere in your app.

it is searching for ./data/packed/latest.json". So do you have a http-call something else to this file?

---

<div class="post-metadata">

**Author:** ![devxoss](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@devxoss](https://forum.ionicframework.com/u/devxoss)\
**Post date:** [January 10, 2017, 1:24pm UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/11 "2017-01-10T13:24:31Z")

</div>

No. Actually moment need two to three file for timezone as you can see in moment timezone site and @type/moment-timezone has nothing which is required for timezone.

I have also installed in other example using npm where moment has three to foure file with moment-timezone name.

---

<div class="post-metadata">

**Author:** ![LeoFonseca](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LeoFonseca](https://forum.ionicframework.com/u/LeoFonseca)\
**Post date:** [March 23, 2017, 12:13am UTC](https://forum.ionicframework.com/t/ionic-2-moment-timze-is-not-able-to-find-tz-method/75733/12 "2017-03-23T00:13:30Z")

</div>

I have the same problem. Any solution ?
