moment-timezone
moment-timezone copied to clipboard
index.d.ts breaks existing version
I have ^0.5.14
version since package.json will automatically update to latest patch versions
. I received v0.5.29
during npm install, It has typescript index.d.ts Breaks the existing versions of angular applications. Can this be considered as a feature change and bump the 0.6.x version ?
Had to manually remove the ^
before the 0.5.14 to fix the issue.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,73): Cannot find name 'T'.
ERROR in ./src/app/advisor/advisor-information.component.ts (60,33): Property 'tz' does not exist on type 'Moment'.
ERROR in ./node_modules/moment-timezone/index.d.ts (47,92): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (47,111): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,27): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,49): ')' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,71): Expression expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,74): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,75): Declaration or statement expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,79): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,32): ',' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,54): Expression expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,64): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (50,20): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,27): Expression expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,37): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,29): Expression expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,38): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (64,1): Declaration or statement expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (47,92): 'MomentZoneOffset' only refers to a type, but is being used as a value here.
ERROR in ./node_modules/moment-timezone/index.d.ts (47,113): Cannot find name 'never'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,9): Cannot find name 'zonesForCountry'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,25): Cannot find name 'T'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,42): Cannot find name 'country'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,51): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,51): Left side of comma operator is unused and has no side effects.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,59): Cannot find name 'with_offset'.
ERROR in ./node_modules/moment-timezone/index.d.ts (47,77): ';' expected.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,77): Cannot find name 'T'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,95): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (48,106): Cannot find name 'never'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,9): Cannot find name 'zonesForCountry'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,25): Cannot find name 'country'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,34): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,42): Cannot find name 'with_offset'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,56): Cannot find name 'boolean'.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,66): 'MomentZoneOffset' only refers to a type, but is being used as a value here.
ERROR in ./node_modules/moment-timezone/index.d.ts (49,87): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (50,9): Cannot find name 'countries'.
ERROR in ./node_modules/moment-timezone/index.d.ts (50,22): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,9): Cannot find name 'guess'.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,15): Cannot find name 'ignoreCache'.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,29): Cannot find name 'boolean'.
ERROR in ./node_modules/moment-timezone/index.d.ts (51,39): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,9): Cannot find name 'setDefault'.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,20): Cannot find name 'timezone'.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,31): Cannot find name 'string'.
ERROR in ./node_modules/moment-timezone/index.d.ts (53,40): 'Moment' only refers to a type, but is being used as a value here.
ERROR in ./node_modules/moment-timezone/index.d.ts (63,15): Cannot find name 'MomentTimezone'.
ERROR in ./angular.component.ts (1139,33): Property 'tz' does not exist on type 'Moment'.
Hi @devansvd re-install again so that it installs 0.5.31 - yes, 0.5.29 for TypeScript was broken =(
Had the same thing going on.
Had to remove the ^.
Tried forcing 0.5.31 as suggested, but that didn't do it for me.
Reverted to 0.5.28
@ellenaua it not updating same issue. Will be using without the ^ for now.
I created this issue 5 hours back when I was facing, but 0.5.31 is Published already. Still facing issue with the latest version. Reverting back to old version before index.d.ts.
moment-timezone - 0.5.31 • Public • Published 21 hours ago
I've been trying all sorts of version, I'm on Angular 5 and installed time-zone
ERROR in node_modules/@types/node/assert.d.ts(2,68): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(31,68): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(40,94): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(40,101): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(40,104): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(42,98): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(42,105): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(42,108): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(50,47): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(50,53): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(50,56): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(77,61): error TS1005: ';' expected. node_modules/@types/node/base.d.ts(10,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(11,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(12,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(13,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(10,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(11,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(12,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(13,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/util.d.ts(21,30): error TS1005: '=' expected. node_modules/@types/node/util.d.ts(134,24): error TS1144: '{' or ';' expected. node_modules/@types/node/util.d.ts(135,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(135,23): error TS1005: ',' expected. node_modules/@types/node/util.d.ts(138,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(138,28): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(148,24): error TS1144: '{' or ';' expected. node_modules/@types/node/util.d.ts(149,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(149,23): error TS1005: ',' expected. node_modules/@types/node/util.d.ts(152,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(152,23): error TS1005: '(' expected.
I've been trying all sorts of version, I'm on Angular 5 and installed time-zone
ERROR in node_modules/@types/node/assert.d.ts(2,68): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(31,68): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(40,94): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(40,101): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(40,104): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(42,98): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(42,105): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(42,108): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(50,47): error TS1144: '{' or ';' expected. node_modules/@types/node/assert.d.ts(50,53): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(50,56): error TS1005: ';' expected. node_modules/@types/node/assert.d.ts(77,61): error TS1005: ';' expected. node_modules/@types/node/base.d.ts(10,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(11,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(12,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/base.d.ts(13,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(10,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(11,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(12,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/ts3.6/base.d.ts(13,1): error TS1084: Invalid 'reference' directive syntax. node_modules/@types/node/util.d.ts(21,30): error TS1005: '=' expected. node_modules/@types/node/util.d.ts(134,24): error TS1144: '{' or ';' expected. node_modules/@types/node/util.d.ts(135,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(135,23): error TS1005: ',' expected. node_modules/@types/node/util.d.ts(138,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(138,28): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(148,24): error TS1144: '{' or ';' expected. node_modules/@types/node/util.d.ts(149,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(149,23): error TS1005: ',' expected. node_modules/@types/node/util.d.ts(152,13): error TS1005: '(' expected. node_modules/@types/node/util.d.ts(152,23): error TS1005: '(' expected.
Try with 0.5.28 remove ^
I was getting the same errors for 23, 25, 28, 31, 33, but actually had to install 0.5.29 in order for them to resolve.
@devansvd @GregKass @iamraffe can you figure out what exactly is going on and suggest a fix? I'm not a fan of TS, but this might be related to dependency management. Is this still true after https://github.com/moment/moment-timezone/issues/858?