首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在node_modules/@types/moment-timezone/moment-timezone.d.ts(50,73)中修复此错误

如何在node_modules/@types/moment-timezone/moment-timezone.d.ts(50,73)中修复此错误
EN

Stack Overflow用户
提问于 2020-04-16 17:46:23
回答 2查看 4.7K关注 0票数 1

我在node_modules中遇到错误,如何修复此ERROR in node_modules/@types/moment-timezone/moment-timezone.d.ts(50,73)

代码语言:javascript
复制
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.
EN

回答 2

Stack Overflow用户

发布于 2020-05-20 08:22:30

更新@types/moment-timezone@0.5.7,它将处理此问题

票数 1
EN

Stack Overflow用户

发布于 2020-09-18 17:37:33

更改package.json文件中的代码。

从目录中删除node_modulespackage-lock.json

然后更改版本并运行npm install

代码语言:javascript
复制
"@types/moment-timezone": "^0.5.7",

至:

代码语言:javascript
复制
"moment-timezone": "0.5.23",
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61247263

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档