简体   繁体   English

找不到全局类型'Array'

[英]Cannot find global type 'Array'

I'm getting this message when I'm trying to get started my app: 当我试图启动我的应用程序时,我收到此消息:

Command: 命令:

npm webpack --config config/webpack.prod.js  --progress --profile --bail

Message: 信息:

Error in bail mode: [default] Cannot find global type 'Array'. 保释模式错误:[default]无法找到全局类型'Array'。

typescript: 2.0.8 is included on package.json typescript:2.0.8包含在package.json

Any ideas? 有任何想法吗?

I fixed it by doing these steps: 我通过以下步骤修复它:

  1. Removing all ~ and ^ prefixes from package dependencies, so they stop auto-updating and breaking stuff. 从包依赖中删除所有~^前缀,因此它们会停止自动更新和破坏内容。
  2. Updating to awesome-typescript-loader@2.2.4 - version ^2.2.1 was not working suddenly for some reason. 更新到awesome-typescript-loader@2.2.4 - 版本^2.2.1由于某种原因没有突然工作。 Neither did 2.2.1 (without the ^ ) 也没有2.2.1 (没有^

That fixed the build Type errors for me. 这为我修复了构建类型错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM