Search code examples
reactjsasp.net-coreaspnetboilerplate

ABP Property 'tz' does not exist on type 'typeof moment'


I downloaded .NET Core & ReactJS template from aspnetboilerplate.com .

I initialized the db.

In reactjs folder, I ran npm install and npm start commands.

I get this error:

Property 'tz' does not exist on type 'typeof moment'.

I tried these :

  • Delete node_modules folder and run npm install and npm start commands
  • npm i @types/moment-timezone --save-dev
  • npm i @types/moment-timezone --save

How can I start this project?


Solution

  • @types/moment-timezone has been deprecated. Try the following:

    1. npm uninstall @types/moment-timezone

    2. Using the following code:

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

    Also, take a look at the issue on GitHub