Base solution for your next web application
Open Closed

moment.tz problem 6.8.0 #6737


User avatar
0
BobIngham created

Following an upgrade from 5.4.1 to 6.8.0 I am getting the dreaded error

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

in AppPreBootstrap.ts.

My package.json reads:

    "moment": "^2.24.0",
    "moment-timezone": "^0.5.23",

My angular.json reads:

              "node_modules/moment/min/moment-with-locales.js",
              "node_modules/moment-timezone/builds/moment-timezone-with-data.js",

I have googled the forum where I found this: https://support.aspnetzero.com/QA/Questions/5014 and the github pages where I found this: https://github.com/aspnetzero/aspnet-zero-core/issues/848 I have tried downgrading moment to 2.19.2 as per the above post but to no avail. Any ideas anyone?


2 Answer(s)
  • User Avatar
    0
    BobIngham created

    Just in case anyone gets this problem here's the answer.... Delete node_modules, upgrade to angular-cli 7.3.7, yarn 1.15.2, node 10.15.3. Reboot. Go for cigarette. Compile and start. Now I have this problem:

    Could not find localization source: AbpWeb
    

    as reported in the browser, any ideas anyone?

  • User Avatar
    0
    BobIngham created

    A bed merge in the Core.csproj file, incorrect version of the TimeZoneConverter file. The process continues, sorry all if you took any time at all on this.