1

I am getting an error in node_modules, how can I fix this ERROR in node_modules/@types/moment-timezone/moment-timezone.d.ts(50,73)

ERROR in node_modules/@types/moment-timezone/moment-timezone.d.ts(50,73): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(50,88): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(50,107): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,23): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,45): error TS1005: ')' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,67): error TS1109: Expression expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,70): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,71): error TS1128: Declaration or statement expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(51,75): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(52,28): error TS1005: ',' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(52,50): error TS1109: Expression expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(52,60): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(53,16): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(54,23): error TS1109: Expression expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(54,33): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(56,25): error TS1109: Expression expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(56,34): error TS1005: ';' expected.
node_modules/@types/moment-timezone/moment-timezone.d.ts(67,1): error TS1128: Declaration or statement expected.
j3ff
  • 5,719
  • 8
  • 38
  • 51
karthi
  • 27
  • 1
  • 2
  • 8

2 Answers2

1

update the @types/moment-timezone@0.5.7 which will take care of this issue

arvind
  • 106
  • 7
1

Change your code inside the package.json file.

Delete node_modules and package-lock.json from your directory.

Then change the version and run npm install.

"@types/moment-timezone": "^0.5.7",

to:

"moment-timezone": "0.5.23",
Yuri
  • 4,254
  • 1
  • 29
  • 46
umesh diwekar
  • 79
  • 1
  • 2