Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 840
emert117 Avatar asked Oct 01 '20 18:10

emert117


1 Answers

@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

like image 143
Antonio Erdeljac Avatar answered Oct 20 '22 09:10

Antonio Erdeljac