[SOLVED] How to import moment-timezone

Hi, I’m trying to import moment-timezone to my app,
I did used typings to install moment-timezone by running this command:
typings install moment-timezone --ambient --save

and import to my page:

import * as moment from 'moment';
import 'moment-timezone';

Moment works but when I call moment.tz, it shows property tz not found.

1 Like

I found solution, run
typings install moment-node --save --ambient

will solve the problem.

1 Like

Should this work yet?

For me I got this error:
Unable to find “moment-node” (“npm”) in the registry.

Any idea?

npm install --save @types/moment-timezone


Great! It worked! Thanks!

Please share the xompelte working code

Yep, this worked for me with:
import moment from “moment”;
import “moment-timezone”;