Ionic 2 angular-moment-timezone - 无法重新声明块范围变量“tz”

Ste*_*tar 5 typescript ionic-framework angular

我不确定我做了什么,但我angular-moment-timezone今天安装在我的 Ionic 项目中,让它工作,可以运行ionic serve得很好,但后来我决定删除我的node_modules文件夹。一旦我这样做了,我就跑了npm i,一旦这一切都完成了,无论何时我尝试运行ionic serve,我都会收到以下错误:

Typescript Error

Cannot redeclare block-scoped variable 'tz'.
node_modules/@types/moment-timezone/index.d.ts

undefined
undefined

Typescript Error

Cannot redeclare block-scoped variable 'tz'.
node_modules/angular-moment-timezone/node_modules/@types/moment-timezone/index.d.ts

undefined
undefined
Run Code Online (Sandbox Code Playgroud)

我不知道我做错了什么,到目前为止我还没有找到任何可以提供帮助的东西。有没有其他人遇到过同样的问题?

LeO*_* Li 5

我们有@types/moment-timezone导致错误的依赖项。

无法重新声明块范围变量“tz”时刻时区

由于 moment-timezone version 0.5.30,d.ts 文件将在 moment-timezone 内。你可以保存删除它

npm uninstall @types/moment-timezone