【问题标题】:Typescript compiler 1.0RC gives Unable to get value of the property 'toLowerCase'Typescript 编译器 1.0RC 给出 Unable to get value of the property 'toLowerCase'
【发布时间】:2014-03-02 07:53:46
【问题描述】:

我刚刚尝试使用 ts 1.0 exe 编译一个 0.9 ts 项目,但在运行我的文件观察程序时得到了这个:

"C:/Program Files (x86)/Microsoft SDKs/TypeScript/tsc.exe" --sourcemap Common.ts --module tsc.js(55958, 21) Microsoft JScript 运行时错误:无法获取属性“toLowerCase”的值:对象为空或未定义

exe是在Visual Studio插件安装的地方定义的,也许我需要使用节点一代替?但是当我将文件观察器指向节点版本时抱怨它不是.exe

【问题讨论】:

标签: node.js typescript webstorm


【解决方案1】:

您正在使用--module 标志但未指定模块类型(因此undefined)。使用--module commonjs

【讨论】:

  • @FutuToad 你能帮我一个忙并运行C:/Program Files (x86)/Microsoft SDKs/TypeScript/tsc.exe 并告诉我版本吗?我无法重现此错误,打字稿团队也无法重现:typescript.codeplex.com/workitem/2247
猜你喜欢
  • 2022-12-26
  • 1970-01-01
  • 2022-07-14
  • 2022-12-01
  • 2022-12-27
  • 2014-12-21
  • 2012-09-28
  • 2019-11-05
  • 2022-12-19
相关资源
最近更新 更多